mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
Merge pull request #372 from nyedidikeke/naming-convention-patch-1
refactor: nomenclature, typo fixes, IDE and documentation enhancement 🔨
This commit is contained in:
commit
321520741d
@ -1 +1 @@
|
||||
PORT=4000
|
||||
PORT=4000
|
||||
|
18
.gitignore
vendored
18
.gitignore
vendored
@ -1,12 +1,28 @@
|
||||
# Misc
|
||||
.DS_Store
|
||||
|
||||
# Dependencies
|
||||
node_modules/
|
||||
|
||||
*.zip
|
||||
*.tgz
|
||||
license.config.json
|
||||
license-header.txt
|
||||
|
||||
# Build Outputs
|
||||
dist/
|
||||
.vscode/
|
||||
|
||||
# VS Code IDE
|
||||
.vscode/**/*
|
||||
!.vscode/extensions.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
!.env.example
|
||||
|
||||
# this is for jetbrain IDEs
|
||||
.idea/
|
||||
/puter
|
||||
|
7
.vscode/settings.json
vendored
Normal file
7
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"dnsmasq",
|
||||
"heyputer",
|
||||
"Puter"
|
||||
]
|
||||
}
|
@ -45,6 +45,7 @@ an invalid setup.
|
||||
```bash
|
||||
git clone https://github.com/HeyPuter/puter
|
||||
cd puter
|
||||
cp .env.example .env
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Configurating Domains for Self-Hosted Puter
|
||||
# Configuring Domains for Self-Hosted Puter
|
||||
|
||||
## Local Network Configuration
|
||||
|
||||
@ -51,7 +51,7 @@ Setting up a local DNS server on your network allows for flexible and scalable d
|
||||
|
||||
- **Pi-hole**: Acts as both an ad-blocker and a DNS server. Ideal for easy setup and maintenance.
|
||||
- **BIND9**: Offers comprehensive DNS server capabilities for complex setups.
|
||||
- **Dnsmasq**: Lightweight and suitable for smaller networks or those new to running a DNS server.
|
||||
- **dnsmasq**: Lightweight and suitable for smaller networks or those new to running a DNS server.
|
||||
|
||||
**contributors note:** feel free to add any software you're aware of
|
||||
which might help with this to the list. Also, feel free to add instructions here for specific software; our goal is for Puter to be easy to setup with tools you're already familiar with.
|
||||
@ -60,7 +60,7 @@ which might help with this to the list. Also, feel free to add instructions here
|
||||
|
||||
1. Choose and install DNS server software on a device within your network.
|
||||
2. Configure the DNS server to resolve `puter.local` and `api.puter.local` to the IP address of your Puter hosting device.
|
||||
3. Update your router’s DHCP settings to distribute the DNS server's IP address to all devices on the network.
|
||||
3. Update your router's DHCP settings to distribute the DNS server's IP address to all devices on the network.
|
||||
|
||||
By setting up a local DNS server, you gain the most flexibility and control over your network's domain name resolution, ensuring that all devices can access Puter and its API without manual configuration.
|
||||
|
||||
@ -68,5 +68,5 @@ By setting up a local DNS server, you gain the most flexibility and control over
|
||||
|
||||
Please note the self-hosting feature is still in alpha and a public production
|
||||
deployment is not recommended at this time. However, if you wish to host
|
||||
publically you can do so following the same steps you normally would to configure
|
||||
publicly you can do so following the same steps you normally would to configure
|
||||
a domain name and ensuring the `api` subdomain points to the server as well.
|
||||
|
@ -55,8 +55,8 @@ If your answer is the second, you should find a way to
|
||||
In my experience, the harder I think about the correct way to implement
|
||||
something, the bigger a mistake I'm going to make; ***unless*** a big part
|
||||
of the reason I'm thinking so hard is because I want to find a solution
|
||||
that reduces complexity and has the right maintanence trade-off.
|
||||
that reduces complexity and has the right maintenance trade-off.
|
||||
There's no easy solution for this so just keep it in mind; there are some
|
||||
things we might write 2 times, 3 times, even more times over before we
|
||||
really get it right and *that's okay*; sometimes part of doing useful work is
|
||||
doing the useless work that reveals what the useful work is.
|
||||
doing the useless work that reveals what the useful work is.
|
||||
|
@ -20,7 +20,7 @@ const CoreModule = require("./src/CoreModule.js");
|
||||
const { Kernel } = require("./src/Kernel.js");
|
||||
const DatabaseModule = require("./src/DatabaseModule.js");
|
||||
const LocalDiskStorageModule = require("./src/LocalDiskStorageModule.js");
|
||||
const SelfhostedModule = require("./src/SelfhostedModule.js");
|
||||
const SelfHostedModule = require("./src/SelfHostedModule.js");
|
||||
const PuterDriversModule = require("./src/PuterDriversModule.js");
|
||||
const { testlaunch } = require("./src/index.js");
|
||||
const BaseService = require("./src/services/BaseService.js");
|
||||
@ -45,5 +45,5 @@ module.exports = {
|
||||
DatabaseModule,
|
||||
PuterDriversModule,
|
||||
LocalDiskStorageModule,
|
||||
SelfhostedModule,
|
||||
SelfHostedModule,
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Puter - Common Javascript Module
|
||||
|
||||
This is a small module for javascript which you might call a
|
||||
"langauge tool"; it adds some behavior to make javascript classes
|
||||
"language tool"; it adds some behavior to make javascript classes
|
||||
more flexible, with an aim to avoid any significant complexity.
|
||||
|
||||
Each class in this module is best described as an _idea_:
|
||||
@ -9,7 +9,7 @@ Each class in this module is best described as an _idea_:
|
||||
### BasicBase
|
||||
|
||||
**BasicBase** is the idea that there should be a common way to
|
||||
see the inheretence chain of the current instance, and obtain
|
||||
see the inheritance chain of the current instance, and obtain
|
||||
merged objects and arrays from static members of these classes.
|
||||
|
||||
### TraitBase
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const config = require("./config");
|
||||
|
||||
class SelfhostedModule extends AdvancedBase {
|
||||
class SelfHostedModule extends AdvancedBase {
|
||||
async install (context) {
|
||||
const services = context.get('services');
|
||||
|
||||
@ -63,4 +63,4 @@ class SelfhostedModule extends AdvancedBase {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = SelfhostedModule;
|
||||
module.exports = SelfHostedModule;
|
||||
|
@ -29,7 +29,7 @@ const surrounding_box = (col, lines) => {
|
||||
// Keeping track of WHY certain versions don't work
|
||||
const ver_info = [
|
||||
{ under: 14, reasons: ['optional chaining is not available'] },
|
||||
{ under: 16, reasons: ['diskusage package ABI mismatch'] },
|
||||
{ under: 16, reasons: ['disk usage package ABI mismatch'] },
|
||||
];
|
||||
|
||||
const lowest_allowed = Math.max(...ver_info.map(r => r.under));
|
||||
@ -59,7 +59,7 @@ const main = async () => {
|
||||
DatabaseModule,
|
||||
PuterDriversModule,
|
||||
LocalDiskStorageModule,
|
||||
SelfhostedModule
|
||||
SelfHostedModule
|
||||
} = (await import('@heyputer/backend')).default;
|
||||
|
||||
console.log('kerne', Kernel);
|
||||
@ -68,7 +68,7 @@ const main = async () => {
|
||||
k.add_module(new DatabaseModule());
|
||||
k.add_module(new PuterDriversModule());
|
||||
k.add_module(new LocalDiskStorageModule());
|
||||
k.add_module(new SelfhostedModule());
|
||||
k.add_module(new SelfHostedModule());
|
||||
k.boot();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user