CodeRef or (CodeReference) is a MEAN Stack application built to help users find useful information about coding keywords.
Current supported languages:
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.
You need Node.js and NPM to run the application.
Install angular-cli globally
This will allow you to use angular commands like
ng serve or
ng generate component [...]
npm install -g @angular/cli
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.
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
(Optional) Download MongoDB
This app currently runs mlab as the database but you can download a local MongoDB for offline use or debugging purposes.
Download the dev dependecies
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
then cd into angular-src to install the front-end dependencies
You know you successfully install the dependencies if you have a
node_modulesfolder in the root directory and one inside the angular-src directory.
Do this EVERY TIME you want to run the development server.
You need to do this everytime for the app to run properly.
- In the root folder run
nodemonyou should get a message like this.
- Open up a new terminal and cd into angular-src.
Cant connect to the database?
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.