Skip to content

Latest commit

 

History

History
76 lines (57 loc) · 2.63 KB

README.md

File metadata and controls

76 lines (57 loc) · 2.63 KB

DZEN-API

Dzen-api is a component of back-end part of SPA comments app, which is responsible for maintaining WebSocket connection with the client, and provide necessary app functionality.

Use this link to connect to the WebSocket Server

Table of Contents

Features

  • Server: Establishing WebSocket connection with the client and events handing.
  • Database: Storing comments information in a database within several tables using relations.
  • Broadcasting: Sending and receiving messages in real time for multiple users.
  • SingleResponse: Sending and receiving messages in real time for single user.
  • Files: Creating file records in database and storing them on cloud service.
  • Files validation: Validating files before storing them on cloud service.
  • Comments validation: Validating comments before storing them in database.
  • Containerization: Containerizing the application using Docker.

Technologies

Installation

To install the project, follow these steps:

  1. Clone the repository with git clone
  2. Run npm install in the root directory
  3. 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).

  • HTTP - the url of the http server to connect.

  • AWS_ACCESS_KEY_ID,

  • AWS_SECRET_ACCESS_KEY,

  • AWS_REGION - credentials for AWS S3 service.

  1. Run npm run dev in the root directory to start the development server
  2. Run npm run start in the root directory to start the production server

Contributing

Contributions are welcome! If you want to contribute to [dzen-api], follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes.
  4. Submit a pull request.

License

MIT