Code Monkey home page Code Monkey logo

express-swagger-prisma-boilerplate's Introduction

Project Initialization and Dependency Setup

Initialize a new project with the default package.json:

yarn init -y

Install runtime dependencies for your project:

yarn add express dotenv cors express-validator @prisma/client

Install TypeScript and type definitions for Node.js, Express, dotenv, and cors:

yarn add -D typescript @types/node @types/express @types/dotenv @types/cors

Install development dependencies, including Prisma, esbuild-register, and nodemon:

yarn add -D prisma esbuild-register nodemon

Prisma Setup

Initialize Prisma with SQLite as the data source provider:

yarn prisma init --datasource-provider sqlite

Push the Prisma schema to the database:

yarn prisma db push

Seed the database with initial data using Prisma:

yarn prisma db seed

Generate the Prisma Client based on your schema:

yarn prisma generate

Linting and Code Quality

Install ESLint, Prettier, and related configurations and plugins for code linting and formatting:

yarn add -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-config-airbnb-base eslint-plugin-node eslint-config-node

Initialize ESLint configuration:

yarn eslint --init

These yarn commands provide the equivalent functionality to the provided npm commands, helping you manage your Node.js project, set up Prisma, and maintain code quality with ESLint and Prettier.

Swagger-UI Setup

Install the dependencies

yarn add swagger-autogen swagger-ui-express

Install the types

yarn add --dev @types/swagger-ui-express

Express validator

Install the dependencies

yarn add express-validator

express-swagger-prisma-boilerplate's People

Contributors

visheshdubey avatar

Watchers

 avatar

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.