mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
7ecb31c46c
Fleshing out the new channel ownership feature, along with a typo fix and small syntax updates. A claim can now be staked with /claimchannel, a channel owner may change a trip's level using /setlevel To do: unclaimchannel, setmotd, makeprivate, makepublic, renewclaim, garbage keeping, update mod commands to accept channelOwner and channelModerator, etc
2.4 KiB
2.4 KiB
Development Environment
- Clone the repository.
- Terminal Command:
git clone https://github.com/hack-chat/main.git hackchat
- Terminal Command:
- Enter the directory in your terminal.
- Terminal Command:
cd hackchat
- Terminal Command:
- Install using npm.
- Terminal Command:
npm install
- Terminal Command:
- Start the application.
- Terminal Command:
npm start
- Terminal Command:
Live Deployment Installation
- (Follow steps 1 - 3 above)
- Use PM2 to start the backend server.
- Terminal Command:
pm2 start ./server/main.js --node-args="-r esm" --name hackchat
- See tips below to make the server start on boot.
- Terminal Command:
- Migrate the contents of
./hackchat/client
into any suitable directory of your webserver. HackChat comes bundled withhttp-server
for development purposes only, it is highly recommended that you use a better web server such as Nginx or Apache. - (OPTIONAL) Cleanup; you may delete
hackchat/clientSource
andhackchat/documentation
Tips
- If you plan on using SSL to serve the client; you will need to use a reverse proxy, as TLS is not natively supported by the hack.chat server software (this may change in future releases).
- Do not use root. Installing while using the root account or installing with root privileges will result in an error similar to the following:
npm WARN lifecycle hack.chat-v2@2.1.92~postinstall: cannot run in wd hack.chat-v2@2.1.91 cd ./clientSource && npm install && cd .. & cd ./server && npm install && npm run config (wd='/dir')
- PM2 may be configured to start the backend server on boot, read https://pm2.keymetrics.io/docs/usage/startup/
- Do not install NodeJS using
sudo apt install nodejs
, instead use:cd ~ curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt install nodejs
- Quick setup script, tested on Ubuntu 18.
cd ~
nano ./hc_install.sh
- Paste:
#!/bin/bash cd ~ sudo apt update sudo apt install build-essential git curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt install nodejs nodejs -v npm -v git --version git clone https://github.com/hack-chat/main.git hackchat cd hackchat npm install
Ctrl + x
Y
chmod u+x ./hc_install.sh
./hc_install.sh