/realtime-polls

A Realtime Polls API using redis for cache and websockets.

Primary LanguageTypeScriptMIT LicenseMIT

Realtime Polls

Badge Badge Badge

A Realtime Polls API using redis for cache and websockets.

📌 Table of contents

⚡ Technologies

This project was developed with the following technologies:

💻 Getting started

Before you begin, you will need to have the following tools installed on your machine:

The project can be built with npm or yarn, so choose one of the approach bellow in case you don't have any installed on your system.

Npm is distributed with Node.js which means that when you download Node.js, you automatically get npm installed on your computer.

The project uses a database (Postgres and Redis for cache), it is necessary to have it on your machine so that you can run it. If not, I suggest using Docker Compose to run a container with the postgres and redis image.

How to run database with Docker Compose locally (linux)
docker-compose up -d

Also, it’s good to have an editor to work with the code like VSCode.

ℹ️ How to run

Follow the instructions below to download and use the project from this repository:

You can use yarn or npm as package manager to run this project, but preferably I use npm.

Clone this repository using SSH:

git clone git@github.com:danielhessell/realtime-polls.git

Go to project folder in terminal/cmd:

cd realtime-polls

Install dependencies:

npm install

Remember to copy the .env.example file to an .env file, changing the information according to your environment.

Run migrations:

npx prisma generate && npx prisma migrate dev

Run project:

npm run dev

The server will start on port 8080. Go to http://localhost:8080.

🎉 How to contribute to the project

  1. Fork the project
  2. Create a new branch with your changes: git checkout -b my-feature
  3. Save the changes and create a commit message telling what you've done: git commit -m "feature: My new feature"
  4. Submit your changes: git push origin my-feature

Caso tenha alguma dúvida confira este guia de como contribuir no GitHub.

📄 License

This project is under the MIT license. See the LICENSE file for more details.


Made by Daniel Hessel.