Last active
April 26, 2020 11:47
-
-
Save imhashir/9e7d81a60fa5632273b27a17a732643a to your computer and use it in GitHub Desktop.
Implementing Custom User/Permissions/Roles System with React, Serverless Lambda & MySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: your-service-name | |
plugins: | |
- serverless-dotenv-plugin | |
- serverless-offline | |
- serverless-plugin-split-stacks | |
custom: | |
dotenv: | |
basePath: environments/ | |
splitStacks: | |
perFunction: false | |
perType: true | |
perGroupFunction: false | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
region: ${env:REGION} | |
timeout: 10 | |
environment: | |
DB_ENDPOINT: YOUR_DB_ENDPOINT_ERE | |
DB_USER: DB_NAME_HERE | |
DB_PASS: DB_PASS_HERE | |
DB_NAME: DB_NAME_HERE | |
vpc: | |
securityGroupIds: | |
- sg-2exxxxxx | |
subnetIds: | |
- subnet-yyyyxxxxzzzzzxxxx | |
functions: | |
permission: | |
handler: app/permissions.router | |
events: | |
- http: | |
path: permissions | |
method: any | |
cors: true | |
- http: | |
path: permission/{id} | |
method: any | |
cors: true | |
user: | |
handler: app/users.router | |
events: | |
- http: | |
path: users | |
method: any | |
cors: true | |
- http: | |
path: user/{id} | |
method: any | |
cors: true | |
- http: | |
path: user/{id}/permissions | |
method: any | |
cors: true | |
role: | |
handler: app/role.router | |
events: | |
- http: | |
path: roles | |
method: any | |
cors: true | |
- http: | |
path: role/{id} | |
method: any | |
cors: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment