Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lawrencec/express-nobabel-nocry-template
An repository template for express application with minimal use of babel
https://github.com/lawrencec/express-nobabel-nocry-template
Last synced: 29 days ago
JSON representation
An repository template for express application with minimal use of babel
- Host: GitHub
- URL: https://github.com/lawrencec/express-nobabel-nocry-template
- Owner: lawrencec
- Created: 2020-06-29T17:21:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T03:15:50.000Z (almost 2 years ago)
- Last Synced: 2024-10-08T13:33:35.142Z (3 months ago)
- Language: JavaScript
- Size: 2.33 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Express Api Template
A starter template for express with:
- Handlers for 404 and health checks
- tests written in jest and supertest
- with eslint and prettier pre-configured
- almost zero babel use; babel is used to transform tests for jest but all server code is transformed via esmSee `engine` field in `package.json` for minimum `node`/`npm` requirements.
![Dependency graph](./target/reports/depcruise/dependencygraph.svg)
## Developer commands
### Install
```shell script
npm run ci
```### Run the api
For dev
```shell script
npm run start:dev
```For production
```shell script
npm run start
```### Code hygiene
```shell-script
npm run lint # eslint
npm run format # prettier
```### Tests
Run once
```shell-script
npm run test
``````shell-script
npm run test:watch
```### CI commands
There is a `Dockerfile` supplied that can be run using make. Additionally, CI tasks can be run using Github Actions.
Both can be tested using the `Makefile`. For running github action workflows locally, [act](https://github.com/nektos/act) is required to be
installed.```shell-script
make build # build the docker image
```````shell-script
make run # run the docker image
``````shell-script
make gha_build # run the build workflow
```````shell script
make gha_pull_request # Run the pull_request event
``````shell-script
make gha_list # list workflows
```## Example Requests
[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/803a965000e4d2f53e55)
- `/health-check` - health check endpoint
- returns 200 if service is healthy or 503 if service is sick