A web application that simulates an event booking system for my university, using Node.js, Express and MongoDB. The system provides the following functions:
- Event creation and management: Staff-level users can create and launch a new event, or adjust the
price, dates/sessions, promotional codes, capacities, etc. on an existing event. - Event booking: System users can view the list of events, make a booking, and modify or cancel an existing booking.
- User management: System users can view their profile and activity log (history). Users can also update their personal details such as email and password.
Register for a staff account to access all features above.
Download Node.js and npm here: https://nodejs.org/en/
npm install
- Create a .env file in root project folder
SESSION_SECRET=XXXXXX
DB_URI=XXXXXX
- SESSION_SECRET can be a random string to secure the session.
- DB_URI is the connection string to MongoDB server (check out MongoDB Atlas). Here is an example connection string
mongodb+srv://<username>:<password>@cluster123-tnkmj.gcp.mongodb.net/test
, whereusername
andpassword
should be substituted with your own user credentials,test
is the name of the database selected.
npm start
- Go to http://localhost:3000 to see your app.
npm run build
and npm run serve
to run the production version after build.
The tests are implemented in src/test
using Mocha. npm run test
to run the test files.
- Express.js - Node.js web application framework
- mongoose - MongoDB object modeling for Node.js
- ejs - Template engine
- bcryptjs - Hash user password
- express-session - User session middleware
- connect-mongo - Use MongoDB for persistent session store
- moment - Formatting and displaying dates and times
- Mocha - API and database testing
- Hieu Chu
- Long Hung Nguyen
Distributed under the MIT License. See LICENSE for more information.