Backend made for the MeetApp project.
- It's an app where the users can sign up for free and create Meetups for other users to join and meet.
You should setup the following software on your machine in order for this backend work.
If you have docker on your machine, you can run the following command to install the databases:
$ docker run --name mongo-meetapp -p 27017:27017 -d -t mongo
$ docker run --name redis-meetapp -p 6379:6379 -d -t redis:alpine
$ docker run --name postgres-meetapp -e POSTGRES_PASSWORD=mysecretpassword -d postgres
MongoDB is being used for storing notifications, Redis is for storing the mail queue used by the Queue server. Postgres is the main database, responsible for storing all data used by the server.
Just run yarn
.
After installing the project's dependencies, you have to copy the .env.example
file and rename it to .env
. Fill in all empty fields with your sensitive data and run the following command in order to create the necessary tables:
$ yarn sequelize db:migrate
$ yarn dev
$ yarn queue
If you use Insomnia, I left a .json
file containing all of the possible API Requests that can be imported into Insomnia.
You can also integrate with Sentry for handling erros in this project while in production. After you signed up in their website and created a project, you should put the DSN inside de .env
file in a SENTRY_DSN
variable. Also note that the node environment variable (NODE_ENV
) should be set to production
in the .env
file. If not, the server will handle errors locally.