CodeRef or (CodeReference) is a MEAN Stack application built to help users find useful information about coding keywords.
Current supported languages:
- HTML
To set up the Development Enviroment please follow these instruction. You'll only need to do this once.
If you have these downloaded you can skip these steps.
This will allow you to use angular commands like ng serve
or ng generate component [...]
npm install -g @angular/cli
Install nodemon
Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for development. Install it using npm.
Just use nodemon
instead of node
to run your code, and now your process will automatically restart when your code changes. To install, get node.js, then from your terminal run:
npm install -g nodemon
This app currently runs mlab as the database but you can download a local MongoDB for offline use or debugging purposes.
https://www.mongodb.com/download-center#community
There are two package.json in the project, one in the root folder for the backend dependencies and one inside angular-src folder. You need to install these dependencies for the application to run and compile correctly.
-
Make sure you are in the root directory of the project! and run this command from there
npm install
-
then cd into angular-src to install the front-end dependencies
cd angular-src
npm install
-
You know you successfully install the dependencies if you have a
node_modules
folder in the root directory and one inside the angular-src directory.
You need to do this everytime for the app to run properly.
- In the root folder run
nodemon
you should get a message like this.
- Open up a new terminal and cd into angular-src.
cd angular-src
ng serve
Go to the config
folder and open up database.js
If you do not have a local mongoDB make sure the mlab database is not commented out.
You can only have one commented at a time, switch if you need to use the local db or mlab.