We often use Serverless for microservices. This is an opinionated starter project for serverless http microservices that uses;
- Serverless
- serverless-http
- serverless-webpack
- Koa
- Typescript
- Jest for testing
- Support for debugging via VisualStudioCode
- Node stack traces supporting sourcemaps
We often use serverless functions for http microservices. These all require common functionality including:
Koa has a library of well maintained, tested & proven middleware to handle all of the above and much more. These are used by many people, have been designed with security in mind to prevent common attacks. There is no need to manually add CORS headers to responses, nor parse request bodies.
- Clone or download this project
- or $
serverless install --url https://github.com/jmannau/serverless-ts-template --name project-name
then
npm install
oryarn install
npm test
to run tests ornpm test -- --watch
to run the tests in watch mode.npm run sls:offline
to start the offline server using serverless-offline