Skip to content

lanista-training/lanista-coach

Repository files navigation

basic-next-serverless-app

Running the example

git clone https://github.com/danielcondemarin/serverless-nextjs-plugin
cd serverless-nextjs-plugin/examples/basic-next-serverless-app

Install dependencies

npm install

Configure nextjs to use a CDN to host the static assets in the bucket:

Replace BUCKET_NAME with your own bucket name. Don't manually create the bucket, the plugin will do that for you.

next.config.js

module.exports = {
  ...
  assetPrefix: "https://s3.amazonaws.com/BUCKET_NAME"
};

Alternatively, remove assetPrefix and the bucket won't be provisioned.

Running locally

npx serverless offline

Deploy

serverless deploy

After deployment is finished, go to the API GW provisioned by serverless and you should be able to hit dev/home and dev/about pages.

lanista-coach

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages