Install all dependencies npm modules (npm install
), mongodb and redis.
-
Run mongodb server
mongod
and redis serverredis-server
-
Run main app,
node app.js monolith
Next run the testcases (see below).
Check two log messages in the monolith logs - checkAndBlockSeats
and confirmSeats
.
-
Run mongodb server
mongod
and redis serverredis-server
-
Run booking service,
node app.js bookingservice
-
Run the main app,
node app.js mainapp
Next run the testcases (see below).
Check two log messages in the booking service logs - checkAndBlockSeats
and confirmSeats
.
You have a very simple microservice called over redis-kue.
Run the authentication testcase (if running the first time), mocha interfaces/express-app/test/auth.js --no-timeouts
Run the booking testcases, mocha interfaces/express-app/test/bookOneTicket.js --no-timeouts
NOTE: run the app before running testcases in a separate terminal.