@atik203/node-express-ts-starter
v1.1.1
Published
This is a boilerplate for Node.js, Express.js, and TypeScript.
Downloads
5
Maintainers
Readme
Node.js-Express.js-MongoDb-Mongoose-Project-Template
This is a backend template using Node.js, Express.js, MongoDB, Mongoose, TypeScript, Zod, and Yarn.
Prerequisites
- Node.js
- Yarn
- MongoDB
- Mongoose
- TypeScript
- Zod
Installation
Install using npx
- Create a new project using the template:
npx @atik203/node-express-ts-starter my-project
- Clone the repository:
git clone https://github.com/Atik203/Node.js-Express.js-MongoDb-Mongoose-Project-Template.git
- Navigate into the project directory:
cd Node.js-Express.js-MongoDb-Mongoose-Project-Template
- Install the dependencies:
yarn Install
- Set up the MongoDB database URL in the
.env
file, following the format provided in the.env.example
file.
Running the Application
- Start the application in development mode:
yarn start:dev
- Or, to start the application in production mode:
yarn start:prod
Building the Application
- To build the application:
yarn build
Linting and Formatting
- To lint the code:
yarn lint
- To automatically fix linting errors:
yarn lint:fix
- To format the code with Prettier:
yarn prettier
- To automatically fix formatting errors with Prettier:
yarn prettier:fix
Enjoy using the application!