Code Monkey home page Code Monkey logo

node-express-prisma-boilerplate's Introduction

Node Express Typescript Prisma Boilerplate

๐Ÿฆ„ Starter template for your Express Prisma MySQL API

๐Ÿ” Stack Specs

  • Node.js
  • Express
  • TypeScript
  • Prisma
  • MySQL

๐Ÿงฌ Development

  • Clone the repository
git clone https://github.com/mcnaveen/node-express-prisma-boilerplate nepb
  • Cd into the project directory
cd nepb
  • Install dependencies
yarn install
  • Create a Database in MySQL (or) You can use GUI to create a database
mysql> CREATE DATABASE express;
  • Copy the .env.sample file as .env
cp .env.sample .env
  • Edit the MySQL Details in the .env file
DATABASE_URL="mysql://USERNAME:PASSWORD@localhost:3306/DBNAME?schema=public"
  • Push the Prisma Schema into Database
npx prisma migrate dev
  • Run the development server
yarn dev

๐Ÿš€ Production Build

  • Run the production build
yarn build
  • Start the production server
yarn start

Your production build is available on dist folder

๐Ÿงญ Endpoints

  • POST - For Creating New User
  • GET - For Getting All Users
  • GET - For Getting User By ID
  • PATCH - For Updating User By ID
  • DELETE - For Deleting User By ID

๐Ÿƒ Examples

๐Ÿ’ก Please install the Recommended VS Code Extensions and Check api.rest file for Examples

  • Creating a New User
POST http://localhost:4000/users
Content-Type: application/json

{
  "name": "john",
  "email": "[email protected]"
}
  • Getting All Users
GET http://localhost:4000/users
  • Getting User By ID
GET http://localhost:4000/users/1
  • Patching User By ID
PATCH http://localhost:4000/users/1
Content-Type: application/json

{
  "name": "newjohn",
  "email": "[email protected]"
}
  • Deleting User By ID
DELETE http://localhost:4000/users/1

โ˜‘๏ธ LICENSE

  • MIT

๐Ÿ’ฐ HELP ME WITH DEVELOPMENT COST

Buy Me A Coffee

node-express-prisma-boilerplate's People

Contributors

bassadin avatar mcnaveen avatar mskian avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

node-express-prisma-boilerplate's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

npm
package.json
  • @prisma/client ^5.14.0
  • express ^4.19.2
  • @types/express ^4.17.21
  • @types/node ^20.12.12
  • nodemon ^3.1.1
  • prisma ^5.14.0
  • ts-node ^10.9.2
  • typescript ^5.4.5

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: node

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.