Live Demo: https://minhblog.herokuapp.com/blog || https://minhblog.herokuapp.com/api/blog
- MongoDB
- Node.js 6.0+
- Command Line Tools
- Mac OS X: Xcode (or OS X 10.9+:
xcode-select --install
) - Windows: Visual Studio
- Ubuntu / Linux Mint:
sudo apt-get install build-essential
- Fedora:
sudo dnf groupinstall "Development Tools"
- OpenSUSE:
sudo zypper install --type pattern devel_basis
Note: If you are new to Node or Express, I recommend to watch Node.js and Express 101 screencast by Alex Ford that teaches Node and Express from scratch. Alternatively, here is another great tutorial for complete beginners - Getting Started With Node.js, Express, MongoDB.
The easiest way to get started is to clone the repository:
# Get the latest snapshot
git clone --depth=1 https://github.com/gangstara2/minhaiwapi myproject
# Change directory
cd myproject
# Install NPM dependencies
npm install
# Or, if you prefer to use `yarn` instead of `npm`
yarn install
# Then simply start your app
node app.js
Note: I highly recommend installing Nodemon.
It watches for any changes in your node.js app and automatically restarts the
server. Once installed, instead of node app.js
use nodemon app.js
. It will
save you a lot of time in the long run, because you won't need to manually
restart the server each time you make a small change in code. To install, run
sudo npm install -g nodemon
.