https://github.com/lqt93/simple-chat-api
Simple NodeJs API for simple-chat-app
https://github.com/lqt93/simple-chat-api
expressjs mongodb mongoose nodejs socket-io
Last synced: 2 months ago
JSON representation
Simple NodeJs API for simple-chat-app
- Host: GitHub
- URL: https://github.com/lqt93/simple-chat-api
- Owner: lqt93
- Created: 2019-05-05T07:27:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T11:04:06.000Z (over 3 years ago)
- Last Synced: 2023-03-08T16:54:15.729Z (over 3 years ago)
- Topics: expressjs, mongodb, mongoose, nodejs, socket-io
- Language: JavaScript
- Homepage:
- Size: 1.41 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimpleChat-API
SimpleChat-API is a simple ExpressJs-based API for [SimpleChat App](https://github.com/lqt93/simple-chat-app)
It uses MongoDB as its database.
### Download
```sh
git clone https://github.com/lqt93/simple-chat-api.git
```
### Require
SimpleChat-API requires NodeJs v10.0 and above.
## Installation
\*\* The instruction uses [Yarn](https://yarnpkg.com/en/) as default, you can either use yarn or npm.
```sh
cd simple-chat-api
yarn install
```
### Running
Add process.env variables by creating an ".env" file in the root folder:
```sh
DB_URI=your_mongodb_uri
PORT=your_desire_port
```
- You must always set DB_URI which is the link to your mongodb database to run the api.
- If you dont set the PORT in .env file, by default, it would be 8000.
Run api by:
```sh
yarn start
```
### License
MIT