NodeServices
This repo hosts sources for the Microsoft.AspNet.AngularServices and Microsoft.AspNet.ReactServices packages, along with samples and the underlying Microsoft.AspNet.NodeServices project.
This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the Home repo.
Trying the samples
To get started,
-
Ensure you have installed the latest stable version of ASP.NET 5. Instructions are available for Windows, Mac, and Linux.
-
Ensure you have installed a recent version of Node.js. To check this works, open a console prompt, and type
node -v. It should print a version number. -
Ensure you have installed
gulpglobally. You can check if it's there by runninggulp -v. If you need to install it:npm install -g gulp -
Clone this repository:
git clone https://github.com/aspnet/NodeServices.git
Using Visual Studio on Windows
- Open the solution file,
NodeServices.sln, in Visual Studio. Wait for it to finish fetching and installing dependencies.
Using dnx on Windows/Mac/Linux
-
Ensure you are using a suitable .NET runtime. Currently, this project is tested with version
1.0.0-beta8oncoreclr:dnvm use 1.0.0-beta8 -r coreclr -
In the solution root directory (
NodeServices- i.e., the directory that containsNodeServices.sln), restore the .NET dependencies:cd NodeServices dnu restore -
Change directory to whichever sample you want to run, then restore the Node dependencies. For example:
cd samples/angular/MusicStore/ npm install -
Build the project
gulp
- Run the project (and wait until it displays the message
Application started)
dnx web
- Browse to
http://localhost:5000/