Skip to content

DEEJ4Y/node-prisma-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node, Express, MySQL, Prisma RESTful API

API docs

This is an example project for working with nodejs, express, MySQL & Prisma ORM.

Installation

  • Clone this repository.

  • Install the dependencies.

    npm install
  • Configure the environment variables.

    Rename example.env to .env and 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.

Project structure

📁controllers

Handle requests, business logic and responses.

📁loaders

Code that runs on app startup.

📁prisma

Prisma schema for Prisma ORM.

📁routes

Map endpoints to controllers.

📁services

Database queries or 3rd party API requests.

📄server.js

App entry point.

About

Example project for working with nodejs, express, MySQL & Prisma ORM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors