- Frontend
- Backend
- Deployment
This project was generated with Angular CLI version 9.1.7.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
The backend runtime is built using Python and Flask and data is persisted in SQLite. View all the endpoints in this file.
Flush the database by simply deleting the database file from the disk. A new file will be created when you start the server again.
The application can be deployed on an VM. Steps to deploy:
# First build the frontend locally. This will create all frontend static files in `backend/taskBoard` directory.
npm run build --prod
# Copy all the files to remote machine, this will copy all the files to backend directory
scp -r -i path-to-key-file.pem backend/ ubuntu@ec2-3-252-125-48.eu-west-1.compute.amazonaws.com:~/backend/
# ssh to the remote machine
ssh -i path-to-key-file.pem ubuntu@ec2-3-252-125-48.eu-west-1.compute.amazonaws.com
# Once you are in, you need to install the requirements and run the server
cd backend
pip3 install -r requirements.txt
# Run the server using
nohup python3 backend.py &
# Find the application por
$ netstat -plnt | grep 8080
ubuntu@ip-172-31-39-248:~$ netstat -plnt | grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 3277/python3
# Kill the process if it's present
$ kill -9 3277
# Start the server again
nohup python3 backend.py &
# Remove the sqlite file
rm -rf task-board-db.sqlite
# Start the application again
nohup python3 backend.py &
Note, this will delete all the existing tasks