This project is a simple expense tracker application with a separate front end and back end.
There are 2 ways to setup the backend server
- Either you can go with basic NodeJS and MySql installation and set up the database and connection URL using env variables.
- Or you can use docker commands and docker-compose to run a single container with a backend and database
- Node.js installed
- Mysql installed and running
- Docker CLI and Docker hub installed
- Fork the repo
-
git clone https://github.com/{your-forked-repo-name}/expense-tracker.git
- Navigate to the
backend
directory:cd backend
- Install dependencies:
npm install
-
cp .env.example .env
- Update the DATABASE_URL environment variable in the
.env
file -
npm run start
- Fork the repo
-
git clone https://github.com/{your-forked-repo-name}/expense-tracker.git
- Navigate to the
backend
directory:cd backend
-
run docker-compose build
-
run docker-compose -p expense_tracker_be up -d
- Check the docker hub, in some cases the backend application container doesn't start
- If the backend application container hasn't started properly run
docker-compose -p expense_tracker_be restart