This is the back-end of the student assignment submission portal web application that is hosted on an AWS EC2 instance.
Here are the links to the Pulumi code that deploys the infrastructure and the Lambda function:
- Pulumi infrastructure - https://github.com/detective-sokka/iac-pulumi
- Lambda function - https://github.com/detective-sokka/serverless
- Node.js(javascript) - Used to run the backend of the application
- Github actions using YAML - Running unit tests and integrations tests to ensure Continuos Testing and Continuous Integration
- Bash script (instance_setup.sh) - Used to setup the web application and install the dependencies in the Virtual machine
- MySql database using Sequelize ORM - Used to store the user login data, assignments and submissions.
- HCL packer script (ami.pkr.hcl) - Used to create the AMI in the dev environment
- Install npm (On linux you can use
sudo apt-get install npm) - Install mysql (On linux you can use this tutorial)
- Run
npm ion the root directory - Run
node index.jsthis should run the application - To test the healthz api run
npm test
- Run
tar -czvf webapp.tar.gzto compress - Run
scp -i [identity-file] webapp.tar.gz [username]@[server-ip] - Connect to server using
sshcommand - Follow the steps mentioned above to run, make sure the .env file is configured properly
- Run
packer init . - Run
packer build ami.pkr.hcl