Everything nest js gives out of the box (Hot Reloading, testing with jest
etc), and
- A starter
User
mongoose schema with a get/create an endpoint using firebase user data - JSON based config setup. Sample config at
config.json
- JSON based Logging setup using
Pino
- Per request UUID logging for easier traceability
- Docker setup
- Firebase auth setup! Along with decorators which can be used at endpoint levels.
- Sample module setup (
health-check
) with unit testing on service, and a sample e2e test. - AWS SDK integration, sample s3 client as a starting point
- Rate limiting (pre configured to limit each IP to 100 requests per 15 minutes) using
express-rate-limit
- OpenAPI/Swagger setup using
@nestjs/swagger
- Data validation using
class-validator
- Global exception handlers to capture
ServerError
with error codes and respond to client with corresponding error messages fromerrorCodes.json
- Connected to MongoDB using
@nestjs/mongoose
, using URL from config. - Codebuild configuration setup (Uses
buildspec.yml
for build configuration and a env variable calledS3_BUCKET
for the bucket to retrieveconfig.json
from. Go through thebuildspec.yml
for more information) Procfile
setup for elastic beanstalk to start the nestJS node process at port 8080- Pre commit hook which runs
tsc
andprettier
- share local AWS config file with docker
yarn
to set up hooks
yarn setuphooks
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
docker build -t server . && docker run -p 127.0.0.1:8080:8080 server
server
is just the image tag name, it could be anything
~ ❯ curl http://localhost:3000/health-check
{"success":true}
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov