We recommend using our Laravel microservice template. This repository is deprecated.
This is a template repo for microservices running on AWS Lambda.
Install dependencies:
$ composer install
$ yarn install
Create a .env
file, based on .env.example
.
Run a local server using
$ php -S localhost:8000 -t public
You can use stages to deploy to development
, staging
and production
(default: development
).
- You have the AWS cli tool installed.
- You have configured a profile for this service.
- You have created
.env.staging
and.env.production
files, based on.env.example
. - Make sure the value for
AWS_PROFILE
in the applicable.env
file corresponds to the profile you created in step 2.
$ npx serverless deploy --stage staging --env staging
$ npx serverless deploy --stage production --env production
Serverless will print the HTTP endpoints to the screen.
Build on Lumen, deployed using Serverless framework.