Introduction
Get started with Magpie
This tutorial assumes you have the following things installed and configured on your machine:
- Nodejs (version greater than 8)
- Mongodb
- NPM
- Angular cli
- Git
To install Magpie on your local machine,follow below steps:
Use the following command to install framework
Note:
If you are using a linux system set the Environment Variable path before installing the framework
To set Environment Variable path open Home > .profile
by using following command
After opening replace the PATH="$HOME/bin:$HOME/.local/bin:$PATH" by following path. After this try again to install
If you find any difficulty in installing remove the npm cache using following command and try again
Run the following command in a terminal to verify the installation
Navigate to the folder where you want create a new project and use following command to create a new project
This will create a new project named testproject
Step 3 - Connect Mongodb
Open
config > DB.js
. Replace the following code with your credentials
Here is a sample DB configuration which is used in this tutorial
Step 5 - Build the application
Open
terminal
and Start mongodb service
Open the project folder
in a
terminal
and run
Open the project folder in another
terminal
and run
If everything was set up correctly you will get the following screen if you go to
http://localhost:4200/
Now that everything is set up correctly, lets dive in to a CRUD
Simple CRUD Tutorial