A microservice for tracking events. This microservice allows you to add, manage and retrieve user related events.
1. Clone the repo
git clone https://github.com/takumade/user-event-tracker
2. Install Dependencies
cd user-event-tracker && npm i
3. Configure and run
Config you .env
file
PORT=3000
MONGOOSE_URL=<mongo-url>
And run
npm run start
4. Seeding (optional)
You can seed the database by running the following command
npm run seed
1. Clone the repo
git clone https://github.com/takumade/user-event-tracker
2. Install Dependencies
In user-event-tracker
folder do this
cd dashboard && npm i
3. Run
And run
npm run start
You can also run this app in a docker container.
1. Review and add changes Review the Dockerfile and build.sh scripts and edit some changes
2. Build the script Make the script executable:
chmod +x build.sh
Run it:
./build.sh
1. Navigate to dashboard directory Go to the dashbaord folder
cd dashbaord
2. Build the script and run
There are two methods to do so
Dockerfile.serve:
Uses serve package. https://www.npmjs.com/package/serve
Dockerfile.nginx:
Uses nginx with Gzip config for better performance.docker build -t dashboard -f ./Dockerfile.nginx .
docker run -p 5173:80 dashboard
# or
docker build -t vite -f ./Dockerfile.serve .
docker run -p 5173:3000 vite