Skip to content

codingwithmanny/nodets-prisma-bootstrap

Repository files navigation

NodeTS Prisma Bootstrap

This is a base NodeJS TypeScript Prisma App built with express and all configurations files included.

This repository is meant to be a base to build on top of for building an API.

Copy This App

git clone https://github.com/codingwithmanny/nodets-prisma-bootstrap myproject;
cd myproject;
rm -rf .git;
git init;
git remote add origin https://github.com/your/newrepo;

Requirements

  • NodeJS v18.12.1 or NVM

Local Setup

While in project directory:

Step 0 - (Optional) NVM Installation

# FROM ./

nvm install;

Step 1 - Install Dependecies

# FROM ./

pnpm install; # npm install;

Step 2 - Start Database

# FROM ./

docker compose up -d;

Step 3 - Set Environment Variables

# FROM ./

cp .env.example .env;

Step 4 - Run Migrations

# FROM ./

pnpm run db:migrate;

Step 5 - Run Seeds

# FROM ./

pnpm run db:seed;

Step 6 - Server Start

Development:

# FROM ./

pnpm dev; # npm dev;

Production:

# FROM ./

pnpm start; # npm start;

Optional - Prisma Studio

# FROM ./

pnpm run db:studio;

Additional - Tear Down Database

# FROM ./

docker compose down --remove-orphans -v;

Production Commands

Build

# FROM ./

pnpm build; # npm run build

Build & Serve

# FROM ./

pnpm start; # npm start

Tests

All Tests

# FROM ./

pnpm test; # npm run test;

Jest Watch

pnpm test:jest; # npm run test:jest;

Jest Coverage

pnpm test:coverage; # npm run test:coverage;

Eslint

pnpm test:lint; # npm run test:lint

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published