The easiest way to get started with Express.js is by using create-express-app-trishan. This CLI tool enables you to quickly start building a new Express.js server, with everything set up for you. You can create a new app using the default Express.js template. To get started, use the following command:
You can create a new project interactively by running:
npx create-express-app-trishan -d project-name
# or
yarn create-express-app-trishan -d project-name
# or
pnpm create-express-app-trishan -d project-name
# or
bunx create-express-app-trishan -d project-name
create-express-app-trishan
allows you to create a new Express.js server within seconds. It is maintained, and includes a number of benefits:
- path aliases ("src/ -> @/")
- helmet
- Helmet helps you secure your Express apps by setting various HTTP headers. It's not a silver bullet, but it can help!
- dotenv
- Dotenv is a zero-dependency module that loads environment variables from a
.env
file intoprocess.env
- Dotenv is a zero-dependency module that loads environment variables from a
- cors
- CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options.
- prisma
- Included Prisma ORM Setup with PostgreSQL as default database, you can change it according to your need.
- Authentication Setup Included with jwt,bcrypt for hashing passwords, auth middleware as well.
- File Upload Middleware Setup with multer and cloudinary
- option to select between JavaScript & TypeScript
- option to select between Prisma, TypeORM, DrizzleORM, Mongoose
- Loggers
- Efficient Express Validators
- Efficient Error Validations