This is a simple api that has user, user posts, likes on a post and comments on a post
- TypeScript
- Graphql
- Docker Database
- Sequelize - ORM
- Docker - Conteinarization
- Clone this repository to your development environment:
git clone https://github.com/felipecal/user-graphql
cd user-graphql
- Install the dependencies:
npm install
or
yarn install
- Create and run database and application containers and image:
- If you want to run the application at your local, comment the part of docker-compose that contains "web", line 3 until line 20 and run the following command:
docker compose up -d
- Copy .env_example, create the .env file with the code of .env_example and set the .env file. Now you can create your database and app in docker with command:
docker compose up --build -d
- Create database tables and seeders:
npx sequelize-cli db:create
npx sequelize-cli db:migrate
npx sequelize-cli db:seed:all
- Opcional: If you dont want to run the application at docker, you can in local with the following commands:
npm start
or
yarn start