# write your code$ vim api.js# deploy your app$ dawson deployURL: https://d123456789abcd.cloudfront.net# run your app locally$ dawson dev
dawson is a serverless web framework for Node.js on AWS.
dawson uses AWS CloudFormation, Amazon CloudFront, Amazon API Gateway and AWS Lambda to deploy the backend code and to manage the infrastructure for you.
The main goal of dawson is to be a zero-configuration yet fully extensible framework for building Node.js serverless web apps on AWS. You should be able to start using dawson without creating any configuration file and with only a basic knowledge of Amazon Web Services.
// api.js
import pug from 'pug';
const template = pug.compileFile('template.pug');
export async function greet (event) {
const name = event.params.path.name
const age = await getUserAge(name);
return template({ name, age });
}
greet.api = {
path: 'greet/{name}'
}
$ npm install -g dawson
$ export AWS_REGION=... AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=...
$ dawson deploy