App to scan badge and extract employee ID
- Ensure AWS credentials are set
- Install Serverless Framework
CD
toapp/
- Run
npm i
to install packages - Create
.env.development
file, then enter belowREGION=<region - e.g. us-east-1> COGNITO_IDENTITYPOOL_ID=<id> COGNITO_USERPOOL_ID=<id> COGNITO_USERPOOL_CLIENT_ID=<id> APPSYNC_API_KEY=<key> APPSYNC_ENDPOINT=<endpoint>
- Run
npm start
(orgatsby develop
)
CD
tostack/
- Run
npm i
to install packages - Run
sls offline
- Ensure you already logged in to Serverless
cd
tostack/
, then runserverless
and follow steps
- Ensure
.env.production
file is setup correctly (similar to.env.development
, but different keys/ids) CD
to root folder- Open
bash
(Windows) orterminal
(Mac), then run. deploy.sh
cd
tostack/
- Run
sls deploy --stage <stage_name>
(allowed stages are currently:dev
,qa
,prod
)
- How to get Cognito info?
cd
tostack/
, then runsls info -v