https://github.com/zurfyx/chat
The open-source chat application for developers.
https://github.com/zurfyx/chat
chat developer nodejs react
Last synced: about 1 year ago
JSON representation
The open-source chat application for developers.
- Host: GitHub
- URL: https://github.com/zurfyx/chat
- Owner: zurfyx
- License: mit
- Created: 2016-10-05T20:51:13.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-11T17:33:29.000Z (almost 9 years ago)
- Last Synced: 2025-03-30T20:11:17.509Z (over 1 year ago)
- Topics: chat, developer, nodejs, react
- Language: JavaScript
- Homepage: http://nyao.io:3000
- Size: 335 KB
- Stars: 29
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nyao - the open-source chat application for developers
## Getting started
### Docker (quickest)
It is taken for granted that you have both [Docker](https://docs.docker.com/engine/installation/) and [Docker Compose](https://docs.docker.com/compose/install/).
```
docker-compose up
```
or
```
docker-compose run --service-ports web npm start
```
Other [execution](#execution) options.
### Node
Requirements:
- [Node.js](https://nodejs.org) (v6+) ([setup](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions))
- [MongoDB](https://www.mongodb.com/) ([setup](https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04))
- [Redis](https://redis.io) ([setup](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04))
```
npm install
```
Start MongoDB & Redis: *(skip this step if you have them running already)*
```
scripts/startdb.sh
```
Run the project (see [Execution](#execution) for alternative options):
```
npm start
```
## Execution
Default (production):
`npm start`
Production (backend only):
`npm run start-prod-backend`
Production (frontend only):
`npm run start-prod-frontend`
Development:
`npm run start-dev`
Development (backend only):
`npm run start-dev-backend`
Production (frontend only):
`npm run start-dev-frontend`
### Docker
When using Docker, npm commands can be passed by overriding the default web command:
```
docker-compose run --service-ports web npm start
```
#### Production
Production Docker Compose gathers the `latest` version from the Docker Hub.
```
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
```
## Configuration
The default configuration file resides in `config/default.js`.
You can create your own configuration files that extend it that suit your own needs
(configuration files are based on [config](https://github.com/lorenwest/node-config)).
To start, you should be creating a `config/production.js` or `config/development.js`, for
development or production respectively, that looks like the following:
```
module.exports = {
passport: {
github: {
clientID: 'Github client ID',
clientSecret: 'GitHub secret key',
callbackURL: 'http://mydomain:3000/api/auth/github/callback',
},
google: {
clientID: 'Google client ID',
clientSecret: 'Google secret key',
callbackURL: 'http://mydomain:3000/api/auth/google/callback',
},
},
}
```
## Development
### Folder structure
```
.
├── backend
├── config
├── data
| ├── db-data
| └── db-session
├── docs
├── frontend
├── public
├── scripts
├── webpack
├── .babelrc
├── .editorconfig
├── .eslintrc
├── .gitignore
├── .package.json
├── .travis.yml
└── README.md
```