This is an example project for working with nodejs, express, MySQL & Prisma ORM.
-
Clone this repository.
-
Install the dependencies.
npm install
-
Configure the environment variables.
Rename
example.envto.envand add your own MySQL database credentials. -
Run the dev server.
npm run dev
You should be able to see similar output once your server is running.
Server started on port 3000.
Connected to MySQL server @ 127.0.0.1
Initialized books table.Handle requests, business logic and responses.
Code that runs on app startup.
Prisma schema for Prisma ORM.
Map endpoints to controllers.
Database queries or 3rd party API requests.
App entry point.