Skip to content

Micro-service backend for MemeStock using Serverless Framework for AWS

Notifications You must be signed in to change notification settings

git-masi/memestock-backend

Repository files navigation

Create A New Service From template-service

  • Go to the root folder of the project
  • Run the following command in your terminal serverless create --template-path ./services/template-service --path NEW_SERVICE_PATH_HERE --name NEW_SERVICE_NAME_HERE
  • Navigate to your new service folder and run npm i

Example for NEW_SERVICE_PATH_HERE: ./services/company-service Example for NEW_SERVICE_NAME_HERE: company-service

Install all service dependencies

npm run install:services

Install all dependencies

npm run install:all

Deploy any service

  • Go to the root folder of the project
  • Run the following command node deployService SERVICE_NAME AWS_NAMED_PROFILE DEPLOYMENT_ENV

Note that the named profile and the deployment env are optional. You probably won't use the env in this project.

Redeploy a lambda in any service

  • Go to the root folder of the project
  • Run the following command node deployFn LAMBDA_NAME AWS_NAMED_PROFILE DEPLOYMENT_ENV

Note that the named profile and the deployment env are optional. You probably won't use the env in this project.

This script assumes an EXACT MATCH between the lambda name and the file name that contains the code for that lambda.

Run a service locally using serverless offline

  • Go to the root folder of the project
  • Run the following command node runServiceOffline LAMBDA_NAME AWS_NAMED_PROFILE

Note that the named profile and the deployment env are optional but you need the correct AWS credentials either way.

About

Micro-service backend for MemeStock using Serverless Framework for AWS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •