diff --git a/server/.gitignore b/.gitignore similarity index 98% rename from server/.gitignore rename to .gitignore index 46de862..4bf93f7 100644 --- a/server/.gitignore +++ b/.gitignore @@ -60,4 +60,4 @@ typings/ # next.js build output .next -config/ \ No newline at end of file +server/config/ \ No newline at end of file diff --git a/README.md b/README.md index 4a68ce6..24ab0cc 100644 --- a/README.md +++ b/README.md @@ -15,18 +15,16 @@ This is a backwards compatible continuation of the [work by Andrew Belt](https:/ ## Installing 1. [Clone](https://help.github.com/articles/cloning-a-repository/) the repository: `git clone https://github.com/hack-chat/main.git` -1. Change the directory: `cd main/server` 1. Install the dependencies using a package manager of your choice: - npm: `npm install` - yarn: `yarn install` -1. Configure: `node main.js` +1. Configure: `node main/server/main.js` - If you change the `websocketPort` option during the config setup then these changes will need to be reflected on [client.js](https://github.com/hack-chat/main/blob/master/client/client.js#L59). + If you change the `websocketPort` option during the config setup then these changes will need to be reflected on [line 59 of client.js](https://github.com/hack-chat/main/blob/master/client/client.js#L59). # Usage -1. Change the directory: `cd main/server/` -1. Start the server with a process manager. For example, with [PM2](https://github.com/Unitech/pm2): `pm2 start main.js --name HackChat` +1. Start the server with a process manager. For example, with [PM2](https://github.com/Unitech/pm2): `pm2 start main/server/main.js --name HackChat` 1. Launch: `main/client/index.html` 1. (OPTIONAL) If you want to deploy your hack.chat instance to a server, push everything except the `node_modules` directory and install the dependencies using a package manager of your choice: - npm: `npm install` diff --git a/client/README.md b/client/README.md deleted file mode 100644 index 292daab..0000000 --- a/client/README.md +++ /dev/null @@ -1 +0,0 @@ -(TODO) diff --git a/server/package-lock.json b/package-lock.json similarity index 100% rename from server/package-lock.json rename to package-lock.json diff --git a/server/package.json b/package.json similarity index 100% rename from server/package.json rename to package.json diff --git a/server/src/commands/admin/addmod.js b/server/commands/admin/addmod.js similarity index 100% rename from server/src/commands/admin/addmod.js rename to server/commands/admin/addmod.js diff --git a/server/src/commands/admin/listusers.js b/server/commands/admin/listusers.js similarity index 100% rename from server/src/commands/admin/listusers.js rename to server/commands/admin/listusers.js diff --git a/server/src/commands/admin/reload.js b/server/commands/admin/reload.js similarity index 100% rename from server/src/commands/admin/reload.js rename to server/commands/admin/reload.js diff --git a/server/src/commands/admin/saveconfig.js b/server/commands/admin/saveconfig.js similarity index 100% rename from server/src/commands/admin/saveconfig.js rename to server/commands/admin/saveconfig.js diff --git a/server/src/commands/admin/shout.js b/server/commands/admin/shout.js similarity index 100% rename from server/src/commands/admin/shout.js rename to server/commands/admin/shout.js diff --git a/server/src/commands/core/changenick.js b/server/commands/core/changenick.js similarity index 100% rename from server/src/commands/core/changenick.js rename to server/commands/core/changenick.js diff --git a/server/src/commands/core/chat.js b/server/commands/core/chat.js similarity index 100% rename from server/src/commands/core/chat.js rename to server/commands/core/chat.js diff --git a/server/src/commands/core/disconnect.js b/server/commands/core/disconnect.js similarity index 100% rename from server/src/commands/core/disconnect.js rename to server/commands/core/disconnect.js diff --git a/server/src/commands/core/help.js b/server/commands/core/help.js similarity index 100% rename from server/src/commands/core/help.js rename to server/commands/core/help.js diff --git a/server/src/commands/core/invite.js b/server/commands/core/invite.js similarity index 100% rename from server/src/commands/core/invite.js rename to server/commands/core/invite.js diff --git a/server/src/commands/core/join.js b/server/commands/core/join.js similarity index 100% rename from server/src/commands/core/join.js rename to server/commands/core/join.js diff --git a/server/src/commands/core/morestats.js b/server/commands/core/morestats.js similarity index 100% rename from server/src/commands/core/morestats.js rename to server/commands/core/morestats.js diff --git a/server/src/commands/core/move.js b/server/commands/core/move.js similarity index 100% rename from server/src/commands/core/move.js rename to server/commands/core/move.js diff --git a/server/src/commands/core/stats.js b/server/commands/core/stats.js similarity index 100% rename from server/src/commands/core/stats.js rename to server/commands/core/stats.js diff --git a/server/src/commands/mod/ban.js b/server/commands/mod/ban.js similarity index 100% rename from server/src/commands/mod/ban.js rename to server/commands/mod/ban.js diff --git a/server/src/commands/mod/kick.js b/server/commands/mod/kick.js similarity index 100% rename from server/src/commands/mod/kick.js rename to server/commands/mod/kick.js diff --git a/server/src/commands/mod/unban.js b/server/commands/mod/unban.js similarity index 100% rename from server/src/commands/mod/unban.js rename to server/commands/mod/unban.js diff --git a/server/src/core/rateLimiter.js b/server/core/rateLimiter.js similarity index 100% rename from server/src/core/rateLimiter.js rename to server/core/rateLimiter.js diff --git a/server/src/core/server.js b/server/core/server.js similarity index 100% rename from server/src/core/server.js rename to server/core/server.js diff --git a/server/src/managers/commands.js b/server/managers/commands.js similarity index 100% rename from server/src/managers/commands.js rename to server/managers/commands.js diff --git a/server/src/managers/config.js b/server/managers/config.js similarity index 100% rename from server/src/managers/config.js rename to server/managers/config.js diff --git a/server/src/managers/imports-manager.js b/server/managers/imports-manager.js similarity index 100% rename from server/src/managers/imports-manager.js rename to server/managers/imports-manager.js diff --git a/server/src/managers/index.js b/server/managers/index.js similarity index 100% rename from server/src/managers/index.js rename to server/managers/index.js diff --git a/server/src/managers/stats.js b/server/managers/stats.js similarity index 100% rename from server/src/managers/stats.js rename to server/managers/stats.js diff --git a/server/src/scripts/configure.js b/server/scripts/configure.js similarity index 100% rename from server/src/scripts/configure.js rename to server/scripts/configure.js diff --git a/server/src/scripts/debug.js b/server/scripts/debug.js similarity index 100% rename from server/src/scripts/debug.js rename to server/scripts/debug.js diff --git a/server/src/scripts/dev.js b/server/scripts/dev.js similarity index 100% rename from server/src/scripts/dev.js rename to server/scripts/dev.js