|
1 | 1 | NodeServices |
2 | 2 | ======== |
3 | 3 |
|
4 | | -This repo hosts the Microsoft.AspNet.NodeServices project. |
| 4 | +This repo hosts sources for the `Microsoft.AspNet.AngularServices` and `Microsoft.AspNet.ReactServices` packages, along with samples and the underlying `Microsoft.AspNet.NodeServices project`. |
5 | 5 |
|
6 | 6 | This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo. |
| 7 | + |
| 8 | +## Trying the samples |
| 9 | + |
| 10 | +To get started, |
| 11 | + |
| 12 | +1. Ensure you have [installed the latest stable version of ASP.NET 5](https://www.asp.net/vnext). Instructions are available for [Windows](http://docs.asp.net/en/latest/getting-started/installing-on-windows.html), [Mac](http://docs.asp.net/en/latest/getting-started/installing-on-mac.html), and [Linux](http://docs.asp.net/en/latest/getting-started/installing-on-linux.html). |
| 13 | +2. Ensure you have [installed a recent version of Node.js](https://nodejs.org/en/). To check this works, open a console prompt, and type `node -v`. It should print a version number. |
| 14 | +3. Ensure you have installed `gulp` globally. You can check if it's there by running `gulp -v`. If you need to install it: |
| 15 | + |
| 16 | + ``` |
| 17 | + npm install -g gulp |
| 18 | + ``` |
| 19 | + |
| 20 | +3. Clone this repository: |
| 21 | + |
| 22 | + ``` |
| 23 | + git clone https://github.com/aspnet/NodeServices.git |
| 24 | + ``` |
| 25 | + |
| 26 | +**Using Visual Studio on Windows** |
| 27 | + |
| 28 | +1. Open the solution file, `NodeServices.sln`, in Visual Studio. Wait for it to finish fetching and installing dependencies. |
| 29 | + |
| 30 | +**Using dnx on Windows/Mac/Linux** |
| 31 | + |
| 32 | +1. Ensure you are using a suitable .NET runtime. Currently, this project is tested with version `1.0.0-beta8` on `coreclr`: |
| 33 | + |
| 34 | + ``` |
| 35 | + dnvm use 1.0.0-beta8 -r coreclr |
| 36 | + ``` |
| 37 | + |
| 38 | +2. In the solution root directory (`NodeServices` - i.e., the directory that contains `NodeServices.sln`), restore the .NET dependencies: |
| 39 | + |
| 40 | + |
| 41 | + ``` |
| 42 | + cd NodeServices |
| 43 | + dnu restore |
| 44 | + ``` |
| 45 | + |
| 46 | +3. Change directory to whichever sample you want to run, then restore the Node dependencies. For example: |
| 47 | + |
| 48 | + ``` |
| 49 | + cd samples/angular/MusicStore/ |
| 50 | + npm install |
| 51 | + ``` |
| 52 | + |
| 53 | +4. Build the project |
| 54 | + |
| 55 | + ``` |
| 56 | + gulp |
| 57 | + ``` |
| 58 | + |
| 59 | +5. Run the project (and wait until it displays the message `Application started`) |
| 60 | + |
| 61 | + ``` |
| 62 | + dnx web |
| 63 | + ``` |
| 64 | + |
| 65 | +6. Browse to [`http://localhost:5000/`](http://localhost:5000/) |
| 66 | + |
0 commit comments