This is the repo for the client & server of help-a-hacker.net. Feel free to contribute; we're always looking for improvements.
The stack used is Nuxt.js and Vue.js on the client, and Express on the server. All in TypeScript.
You must have docker installed on your local machine and know some basic git-fu.
Clone the repo onto your local computer:
git clone https://github.com/timmyichen/help-a-hacker
Install the packages
Build and start the server:
In a new terminal process, run the following:
docker exec -it mongo0 mongo
This will be up the mongo shell. Then type in the following to configure the replica set:
You should see something that has
"ok" : 1 as the first line.
Restart the server by saving any of the
.ts files in the
Later on, you may have to do this when first running
docker-compose up after a few
seconds as the mongodb replica set may need some time to elect a leader (and the
connection will fail as its trying to do so).
Connecting to the Docker Mongo Shell
docker-compose exec mongo0 mongo mongodb://localhost:27017,mongo1:27017,mongo2:27017/helpahacker?replica Set=rs0
To run tests, run:
docker-compose exec app npm run jest:watch
To run a test for a particular file, run:
docker-compose exec app npm run jest:watch path/to/file
To turn watchmode off, just remove