This is the business logic REST API for the HandsOnCoding project, an open-source MOOC (Massive Open Online Courses) for multiple programming languages.
In order to run this project you should install Node in your computer.
To have full access to the database, you should enable your computer IP address in the MongoDB cluster.
- Clone the repository
git clone https://github.com/Esarac/HandsOnCoding-Back.git
- Go inside the project folder
cd HandsOnCoding-Back
- Install npm packages
npm i
In the schema.prisma file, you can define all your schemas and the database provider.
To submit your changes into the database, use the following command:
npm run db-push
For more information, visit the Prisma webpage.
You can also define the:
- PORT
- DATABASE_URL
in the .env.development and .env.test files.
To run the REST API, just execute the command:
- Dev env
npm start # or npm run dev
- Test env
npm run test
For more information, you can access the API documentation via the route http://localhost:8080/api/v1/docs.
Prisma Studio is a visual editor for the data in your database.
To open Prisma Studio, use the following command:
- Dev env
npm run ps-dev
- Test env
npm run ps-test