Skip to content

The RESTful API for the comments app, using TypeScript, Express, PostgreSQL, Prisma ORM and more...

Notifications You must be signed in to change notification settings

andriibezkorovainyi/dzen-api

Repository files navigation

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

About

The RESTful API for the comments app, using TypeScript, Express, PostgreSQL, Prisma ORM and more...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published