See roadmap
docker python aws-cli aws-sam cli npm
There are a lot of pieces to make this run locally. In order to start everything up in development you can do the following from the repository root directory:
-
Log in to aws via SSO
aws sso login
-
Start local stack (for Dynamo) by running
docker-compose up
-
Start lambda emulation
make start-api-local
-
Start the UI
make start-ui-local
-
Build the database schema
make build-table-local
-
Populate the starter data
make populate-table-local
At this point, you should be able to use the application. For example, if you go to http://localhost:3001/genres
you should
see a list of song genres.
- The db script will fail if your table already exists. It has to be deleted if you need to change it. You can do that either by restarting localstack via docker-compose or by manually deleting the table. Localstack is not configured to save data between runs.
- The UI will reload automatically when you change the code. The API service will not. You need to run make build-api to see changes reflected.
- If you want instant feedback, you can have api and ui unit tests run automatically by running the following commands:
In
api/songs
: -
npm run unit:dev
In ui/
:
npm test
npm run test-acc
-
To run all tests, including integration run the following command from the repository root:
make test