Dzen-http-server is a second component of back-end part of SPA comments app, which is responsible for maintaining HTTP connection with the client, maintaining user, file service and verifies captcha.
Use this link to connect to the https server
- Server: Establishing HTTP connection with the client and events handing.
- Database: Storing users information, including IP and UserAgent in a database within several tables using relations.
- Files: Gets files from cloud storage.
- Captcha: Verifies captcha token.
- User validation - Validating user before storing them in database.
To install the project, follow these steps:
- Clone the repository with git clone
- Run
npm install
in the root directory - The project requires these environment variables to be set:
-
DATABASE_URL
- the url of the database(e.g.postgresql://user:password@localhost:5432/database
) -
PORT
- the port websocket server will be running on(Heroku use it). -
AWS_ACCESS_KEY_ID
, -
AWS_SECRET_ACCESS_KEY
, -
AWS_REGION
- credentials for AWS S3 service.
- Run
npm run dev
in the root directory to start the development server - Run
npm run start
in the root directory to start the production server - Run
npm run container
in the root directory to start the production server in a container
Contributions are welcome! If you want to contribute to [dzen-api], follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Submit a pull request.