This is a library management system built with the MEAN (MongoDB, Express, Angular, Node.js) stack.
-
Clone the repository.
git clone [email protected]:mongodb-developer/library-management-system.git library
-
Install the dependencies in the root level of the project.
library/
npm install
-
Set your Atlas URI connection string, database name and server port in
server/.env
. Make sure you replace the username and password placeholders with your own credentials.library/server/.env
PORT="5000" DATABASE_URI="mongodb+srv://<username>:<password>@m0.kwqkoewm.mongodb.net" DATABASE_NAME="library" SECRET="secret"
-
Start the server application.
library/server/
npm install && npm start
-
Open a new terminal window and start the client application.
library/client/
npm install && npm start
-
When both applications are built and running, open your browser on http://localhost:4200/.
Currently, the project has only API tests implemented with supertest
and mocha
. To execute them, navigate to the server/
directory and run:
library/server/
npm test
The project utilizes Husky to execute actions before every commit. The pre-commit hook, located in .husky/pre-commit, lints the code and runs the API tests.
Use at your own risk; not a supported MongoDB product