Skip to content

Commit 6223187

Browse files
committed
docs(prerequisites): add node-gyp info, etc
1 parent 83aab50 commit 6223187

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

Diff for: docs/01_Getting_Started/01_Prerequisites.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
## Prerequisites
22

3-
Make sure you have all the required dependencies available:
3+
### npm modules
4+
5+
Make sure you have all the required Node dependencies available:
46

57
```bash
68
npm install -g yo gulp-cli generator-angular-fullstack
79
```
810

11+
### MongoDB
12+
913
If you're using MongoDB (which you probably are), you'll have to install it from [here](https://www.mongodb.com/download-center#community).
1014
You should then run the `mongod` process, which is in `<install_path>/MongoDB/Server/<version>/bin/`. You'll also want a `/data/db` folder
1115
somewhere for Mongo to put your database in. It would be wise to make a script to automate this command, and maybe even run this script on
@@ -17,6 +21,38 @@ your computer's startup. Example:
1721
/var/lib/mongo/server/3.2/bin/mongod --dbpath /data/db
1822
```
1923

24+
### node-gyp
25+
26+
`node-gyp` is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. You'll need it for things like brotli compression.
27+
28+
Read through the [Installation section of the `node-gyp` readme](https://github.com/nodejs/node-gyp#installation). Basically you'll need [Python 2.7](https://www.python.org/downloads/), `make`, and a C/C++ compiler (like GCC on unix, Xcode on OS X, or Visual Studio tools on Windows). To tell npm to use Python 2.7 (if you also have a different version installed), run `npm config set python /path/to/executable/python2.7`. Here's a snapshot of the instructions from their readme:
29+
30+
* On Unix:
31+
* `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)
32+
* `make`
33+
* A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
34+
* On Mac OS X:
35+
* `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on Mac OS X)
36+
* [Xcode](https://developer.apple.com/xcode/download/)
37+
* You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads`
38+
* This step will install `gcc` and the related toolchain containing `make`
39+
* On Windows:
40+
* Option 1: Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator).
41+
* Option 2: Install tools and configuration manually:
42+
* Visual C++ Build Environment:
43+
* Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option.
44+
45+
* Option 2: Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) (or modify an existing installation) and select *Common Tools for Visual C++* during setup. This also works with the free Community and Express for Desktop editions.
46+
47+
> :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773)
48+
49+
* Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.)
50+
* Launch cmd, `npm config set msvs_version 2015`
51+
52+
If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
53+
54+
### Create a new folder for your project
55+
2056
Make a new directory, and `cd` into it:
2157
```bash
2258
mkdir myapp && cd $_

0 commit comments

Comments
 (0)