This repository demonstrates a sample application using:
- Nuxt.js
- Serverless Framework
- AWS Lambda
- AWS API Gateway
To run the application locally, run:
$ npm run start:dev
Follow these steps:
-
If you want to change the service name, check the
serverless.yml
file.
Change this line: "service: serverless-nuxt-lambda
" -
You will have to add your own domain to the
secrects.json
file.
NOTE: Make sure that you have a SSL certificate for the (sub)domain on AWS before getting to the next step.
-
To register the new (sub)domain on AWS, run:
$ sls create_domain
And then wait for about 30 min for AWS to set things up. -
After that run
$ npm run deploy
and you are all set.
The Serverless Framework will create a CloudFormation file for you and create an API Gateway and Lambda.
I got this idea from a blog post by @adnanrahic