This repository contains the "read projects" API for the RCOS Open Source Curriculum Project project. Powered by Rensselaer Center for Open Source.
This repository uses the aws-serverless-express
library to implement an AWS Lambda function that calls an express router that serves the API. However, this project can be tested locally as a normal express server.
In the production setup, the frontend projects that access this API do so through a CloudFront distribution. As a result, updates to this lambda will not propagate to the frontend immediately. The cache must break first.
- Ensure the most recent LTS version of NodeJS is installed
git clone
Clone this repository- Open a terminal in the project directory
yarn install
to install dependenciesyarn test
to ensure everything worksyarn start
to start the development server
yarn start
starts a local express server for testingyarn test
runs the mocha/chai unit testsdeploy:create
creates a new lambda function on AWS for this project (In theory, you won't ever need this cause I already ran it)deploy:update
updates the lambda function on AWS (you'll need to run this if you make changes)
In order to use deploy commands, you will need an AWS profile called codingandcommunity
.
To get AWS credentials, get an IAM account in the codingandcommunity
group. Talk to E-board to get these credentials.
To add these credentials to your environment, edit the file: vi ~/.aws/credentials
If you already have an account with AWS, you will probably have a default set of credentials, add the codingandcommuity
entry below them. If not, add them to the empty file.
[default]
aws_access_key_id=[..................]
aws_secret_access_key=[......................................]
[codingandcommunity]
aws_access_key_id=[..................]
aws_secret_access_key=[......................................]
Add your name here if you're committing changes to this repository.