π Serverless Boilerplate is starter code for your backend and REST API based on Serverless framework with Express JS, TypeScript, Prisma and MongoDB. β‘οΈ Made with Serverless framework, Live reload, Offline support, ExpressJS, TypeScript, ESLint, Prettier, Husky, Lint-Staged, Jest, Commitlint, Dotenv, VSCode.
Clone this project and use it to create your own backend.
Developer experience first:
- π₯ Serverless framework
- β‘οΈ ExpressJS
- β Type checking TypeScript with strict mode
- π ORM with Prisma
- π Database with MongoDB with in-memory database for local development
- π Linter with ESLint with Airbnb configuration
- π Code Formatter with Prettier
- π¦ Husky for Git Hooks
- π« Lint-staged for running linters on Git staged files
- π Lint git commit with Commitlint
- π Write standard compliant commit messages with Commitizen
- π¦Ί Unit testing with Jest and Supertest for integration testing
- π· Run tests on pull request with GitHub Actions
- π Automatic changelog generation with Semantic Release
- π‘ Absolute Imports using @ prefix
- π VSCode configuration: Debug, Settings, Tasks and extension for ESLint, Prettier, TypeScript, Jest
- π Local support with Serverless Offline
- βοΈ Environment variable with Serverless Dotenv
- π Fast bundler with esbuild
- β¨ HTTP Api instead of API gateway for cost optimization
- π¨ Live reload
- Minimal code
- π Production-ready
Build your SaaS product faster with Node.js SaaS Boilerplate.
Green Nextjs Landing Page Template | Purple Saas Nextjs Theme |
---|---|
Find more Nextjs Templates.
- Node.js 16+ and npm
Run the following command on your local environment:
git clone --depth=1 https://github.com/ixartz/Serverless-Boilerplate-Express-TypeScript.git my-project-name
cd my-project-name
npm install
Then, you can run locally in development mode with live reload:
npm run dev
The local server is now listening at http://localhost:4000
You can deploy to production with the following command:
npm run deploy-prod
If you are VSCode users, you can have a better integration with VSCode by installing the suggested extension in .vscode/extension.json
. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience.
With the plugins installed on your VSCode, ESLint and Prettier can automatically fix the code and show you the errors. Same goes for testing, you can install VSCode Jest extension to automatically run your tests and it also show the code coverage in context.
Pro tips: if you need a project wide type checking with TypeScript, you can run a build with Cmd + Shift + B on Mac.
Everyone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug.
Licensed under the MIT License, Copyright Β© 2022
See LICENSE for more information.
Made with β₯ by CreativeDesignsGuru