Skip to content

devpanda0/backend_boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 8, 2023
cb2fe2b · Nov 8, 2023

History

6 Commits
Aug 2, 2023
Aug 2, 2023
Aug 2, 2023
Aug 2, 2023
Aug 2, 2023
Nov 8, 2023
Aug 2, 2023

Repository files navigation

Backend Boilerplate

Description

Project created to be used as a backend boilerplate for future projects. In the folder src/services you can add your services, and in the folder src/routes you can add your routes.

You must register your services in the src/main.ts file. There is the start function where the service is started and if you have a stop function in your service you have to call it in the stop function.

There is a config service that is managed from the database, so see schema.prisma.

How to use

  1. Clone the repository.
  2. Install the dependencies.
  3. Create a .env file.
  4. Run the project.

Packages

Scripts

  • dev: Run the project in development mode.
  • start: Run the project in production mode.
  • prisma:generate: Generate the prisma client.
  • prisma:push: Push the prisma schema to the database.
  • prisma:pull: Pull the prisma schema from the database.
  • prisma:seed: Seed the database. IT OVERRIDE ALL SETTINGS!
  • prisma:studio: Open the prisma studio.

.env

DATABASE_URL=postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public

TODOs

  • Add Event System
  • Add Custom Logger

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published