Introduction
Installation
How to get the framework and install all the required dependencies
Before started
Before getting the code and installing dependencies, there are 2 applications that you need to install manually first, because the installation process depends on which Operation System (OS) your computer is running.
First is the MongoDB Server, you can check out the installation guide here: MongoDB Installation Tutorials. We recommend installing the latest version or any version that is greater or equal to MongoDB 4.4 for better compatibility.
Second is the NodeJS Engine, go to this NodeJS download page and download the installer file that matches your OS. We recommend the latest version or any version that is greater or equal to v16.0.0. Alternatively, if you are a NodeJS developer, you can use Node Version Manager (NVM) which allows you to install multiple versions of NodeJS and switch between installed versions for different NodeJS projects.
Getting the code
Currently, there are 2 ways you can get the framework
Using Npx
We recommend using this method since it's faster and more reliable. Once you have NodeJS installed, you can run the command line below to create a Glife REST API Framework project.
npx install create-glife-rest-api-framework (dont have yet)
Git clone
The second method is using git to clone the boilerplate source code from the GitHub page here. Make sure Git is installed and run the command line below to clone the source code
git clone git@github.com:GlifeRnD/API-Framework.git glife-rest-api-framework
Install dependencies
Once you have the project, you can run the command lines below to install all the dependencies using NodeJS built-in package manager npm.
cd glife-rest-api-framework
npm install
Another tool you can use is yarn, a package manager developed by Facebook. Make sure Yarn is installed globally and again run the command lines below
cd glife-rest-api-framework
yarn install
Running the project
To start up the project for development, just simply run one of these command lines below depending on which package manager you are using
npm run dev
or
yarn dev