This Nodejs REST API part three is intended to be secure and user-friendly, and it makes use of best API practices
The APIs could be improve over time to be more secure.
-
Configure Azure Data Studio download link
-
Platform: Windows Use installer (recommended)
-
Install Azure Data Studio
-
Open Azure Data Studio
-
From Welcome tab, Click on
Deploy a server
-
Select
Sql server on Windows
-
version:
SQL Server 2019
-
Insall
SQL Server 2019
-
-
Create a connection
-
npm install
-
.env file should filled with the correct values. Check the .env.example.md file for more info.
-
npx prisma migrate dev --name init
-
Seed the database once or comment out
seed();
function in the seeding filenpx prisma db seed
-
Check database to see if the data is seeded
- Refresh the database
- In dbo.user table, there should be 2 users seeded
- admin and user
-
npm start
-
Use postman to test the APIs
-
Download the
Nodejs Rest API P3_Prisma.postman_collection.json
file on the current repo -
Launch Postman
-
Select the import icon.
-
Upload the Nodejs Rest API P3_Prisma.postman_collection file
-
Go to auth/login and enter the username and password
-
{ "email": "admin@gmail.com", "password":"password" }