- cd ./code
In order to use, first install the dependencies in package.json (the resulting node_modules folder will be 40mb)
- npm install
- node cmdb-server.mjs or
- npm run start
Dev run (auto re-runs on code changes, requires nodemon package)
- npm run dev
- npm run test
- express - For Handling HTTP requests
- node-fetch - For Making server side HTTP requests
- cookie-parser
- express-session
- cors
- passport (didn't up using it because I didn't understand how to make it work)
- mocha - A framework to run tests (which allows the use of other assertion libraries)
- chai - The assertion library to use
- deep-equal-in-any-order - A plugin for chai that makes testing complex objects easier
- chai-http - Used for doing HTTP requests in the tests
- supertest - Another assertion library for tests as requested in Part 3 of the assignment
- nodemon -
You can optionally install it globally since it's not a component that is part of our code and it's a useful package to use globally. (installing other types of packages globally isn't very recommended since it can be tricky IMO). To install globally, run
npm install nodemon -g
. Run .js files like: nodemon <file.mjs>. This will make so we don't have to restart the server everytime we make changes to our code, which can make developing faster and easier. Then you will be able to runnpm run dev
It's a NoSQL and document structured database. which was built using Java and runs w/ the JVM. It stores our data in JSON format, which is an advantage because we're using JS, so the there's interoperability between the database and our server. It can be accessed by an HTTP API and follows the REST principles. Elastic Search 8.5.3 is 600mb, once it is ran. An Elastic Search cluster is created once you run it, it's a group of one or more Elasticsearch nodes instances that are connected together, which store our data. Elastic Search is by default running in port 9200