1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00
hack-chat-main/README.md

102 lines
3.9 KiB
Markdown
Raw Normal View History

2018-04-09 11:01:44 +08:00
# Hack.Chat
2018-05-11 21:28:49 +08:00
[hack.chat](https://hack.chat/) is a minimal, distraction-free, account-less, log-less, disappearing chat service that is easily deployable as your own service. The client comes bundled with LaTeX rendering provided by [KaTeX](https://github.com/Khan/KaTeX).
2018-03-10 15:47:00 +08:00
2018-05-11 21:28:49 +08:00
A list of software developed for the hack.chat framework can be found at the [3rd party software list](https://github.com/hack-chat/3rd-party-software-list) repository. This includes bots, clients, docker containers & more.
2018-04-19 23:34:58 +08:00
2018-05-11 21:28:49 +08:00
This is a backwards compatible continuation of the [work by Andrew Belt](https://github.com/AndrewBelt/hack.chat). The server code has been updated to ES6 along with several new features- including new commands and hot-reload of the commands/protocol.
2018-03-10 15:47:00 +08:00
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Prerequisites
2018-04-09 11:01:44 +08:00
The following versions are __required__:
2018-03-10 15:47:00 +08:00
```
node >= 8.10.0
npm >= 5.7.1
```
2018-05-11 21:28:49 +08:00
An installation guide for your operating system can be found [here](https://nodejs.org/en/download/package-manager/).
2018-04-09 11:01:44 +08:00
2018-03-10 15:47:00 +08:00
### Installing
2018-05-11 21:28:49 +08:00
First you will first need to clone this git, if you are unfamiliar with this process read [cloning a repository](https://help.github.com/articles/cloning-a-repository/), or to clone with git:
2018-04-09 11:01:44 +08:00
```
git clone https://github.com/hack-chat/main.git
```
2018-04-09 11:11:03 +08:00
Once cloned, the server will need to be setup. Using your terminal run:
2018-03-10 15:47:00 +08:00
```
2018-04-09 11:01:44 +08:00
cd main/server/
2018-03-10 15:47:00 +08:00
npm install
```
Or on a Windows machine with Yarn installed:
```
2018-04-09 11:01:44 +08:00
cd main/server/
2018-03-10 15:47:00 +08:00
yarn install
```
2018-04-09 11:11:03 +08:00
This will install the required packages to run hack.chat. Next the server will need to be configured, again in your terminal run:
2018-03-10 15:47:00 +08:00
```
node main.js
```
The configuration script will execute the initial server setup by requesting input. Follow the steps until it finishes.
2018-03-10 15:47:00 +08:00
___Note:___ 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).
2018-04-09 11:01:44 +08:00
2018-04-09 11:11:03 +08:00
After the config script runs, the process will exit & the server will need to be relaunched. For a production environment we recommend using [PM2](https://github.com/Unitech/pm2) to start the server:
2018-04-09 11:01:44 +08:00
```
cd main/server/
pm2 start main.js --name HackChat
```
Launch `main/client/index.html`, you may now begin development or deploy to production environment.
2018-03-10 15:47:00 +08:00
## Deployment
2018-04-09 11:01:44 +08:00
After the initial installation and configuration, push everything except the node_modules folder to the live server and re-run:
2018-03-10 15:47:00 +08:00
```
npm install
```
2018-04-09 11:01:44 +08:00
You can now run start the server software with a process manager like [PM2](https://github.com/Unitech/pm2). The client code will need to be copied into your http server directory. 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).
2018-03-10 15:47:00 +08:00
2018-05-11 23:31:20 +08:00
# Changelog
A list of changes since the legacy client can be viewed in the [changelog](CHANGELOG.md).
2018-05-12 00:00:27 +08:00
# Documentation
The [documentation](DOCUMENTATION.md) can be useful for making bots etc.
# Contributing
If you are changing the commands, make sure it is backwards compatible with the legacy client and you update the [documentation doc](DOCUMENTATION.md) accordingly.
2018-03-10 15:47:00 +08:00
## Authors
2018-05-11 21:28:49 +08:00
* **Marzavec** - *Initial work* - [marzavec](https://github.com/marzavec)
* **MinusGix** - *Base updates* - [MinusGix](https://github.com/MinusGix)
2018-03-10 15:47:00 +08:00
2018-03-10 15:51:46 +08:00
See also the list of [contributors](https://github.com/hack-chat/main/graphs/contributors) who participated in this project.
2018-03-10 15:47:00 +08:00
## License
This project is licensed under the [WTFPL License](LICENSE).
2018-03-10 15:47:00 +08:00
## Acknowledgments
2018-05-11 21:28:49 +08:00
* Andrew Belt, https://github.com/AndrewBelt/hack.chat, for original base work
* [wwandrew](https://github.com/wwandrew/), for finding server flaws (including attack vectors) and submitting ~~___incredibly detailed___~~ bug reports