This is a Node.js, Express, Prisma, and TypeScript template designed to help you quickly set up a robust and scalable backend application.
- Node.js: A JavaScript runtime built on Chrome's V8 JavaScript engine.
- Express: A minimal and flexible Node.js web application framework.
- Prisma: A next-generation ORM that helps you query your database in a type-safe way.
- TypeScript: A strongly typed programming language that builds on JavaScript.
- Node.js (v14 or higher)
- npm (v6 or higher)
- MongoDB (or any other supported database)
-
Clone the repository:
git clone https://github.com/Thund3rHawk/NEPT-Template.git
-
Install dependencies:
cd NEPT-Template npm install -
Set Up Environment Variables:
This project uses environment variables to manage configuration. You can find a sample configuration file named
.env.samplein the root directory. To set up your environment variables, follow these steps:- Copy the
.env.samplefile to a new file named.env:cp .env.sample .env
- Open the
.envfile and update the values as needed for your local development environment.
Make sure not to commit your
.envfile to version control to keep your sensitive information secure. - Copy the
-
Set up the database:
npx prisma generate
- Start the development server:
npm run dev
- The server will be running at
http://localhost:8080.
NEPT
├── prisma
│ └── schema.prisma
├── src
│ ├── controllers
│ │ └── user.controller.ts
│ ├── db
│ │ └── index.ts
│ ├── middlewares
│ │ └── errorHandler.moddleware.ts
│ ├── routes
│ │ └── user.routes.ts
│ ├── services
│ │ └── userService.ts
│ ├── utils
│ │ └── asyncHandler.ts
│ └── index.ts
├── .env.sample
├── .gitignore
├── .prettierignore
├── .prettierrc
├── package-lock.json
├── package.json
├── README.md
└── tsconfig.json
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.