A backend application built with Prisma, Docker and NestJS
Report Bug
·
Request Feature
This application was built with:
Before you start, make sure you have Docker and Node installed on your local machine.
Documentation can be found, after initial setup, for HTTP in Swagger, for GraphQL in GraphQL Playground.
- Clone this repo into your local machine
- with https
git clone https://github.com/netguru/heroes-api.git
- or with ssh
git clone [email protected]:netguru/heroes-api.git
-
Launch Docker compose to run Prisma's and MySQL's images.
docker compose up -d
-
Open API container's terminal
docker compose exec api /bin/sh
-
Deploy database schema into the MySQL database.
npx prisma db push
-
Seed the database with default data.
npx prisma db seed
After the initial setup there's no additional work needed, project is running in the background as a Docker container.
- The REST API is available on your local machine on
http://localhost:3000
. - Swagger documentation is available on
http://localhost:3000/swagger/
. - GraphQL playground (and server) is available on
http://localhost:3000/graphql
.
You can stop it by executing docker compose stop
, and you can resume it by docker compose start
Distributed under the MIT License. See LICENSE
for more information.