Skip to content

Commit e3372fa

Browse files
committed
Merge branch 'master' of github.com:ServiceStack/ServiceStack.UseCases
2 parents 9bfdf9d + 3e82183 commit e3372fa

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

NodeStackProxy/README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1-
# ServiceStack + Node.js demo project
1+
# Self-hosted ServiceStack + Node.js demo project
2+
3+
The project demonstrates how you can easily build single page applications (SPA) using [node.js](http://nodejs.org/download/) with Express, Jade templates and geared with ServiceStack as a backend API engine. The application works for Windows and Linuxes. To simplify development node.js used a proxy to route all "/api" requests to SericeStack but for heavy loaded sites you can use [nginx](http://wiki.nginx.org/Main).
4+
5+
## Instructions
6+
7+
Make sure that [node.js and npm](http://nodejs.org/download/) is installed and path variables are set correctly (`Windows`: install it with `.msi`, `Linux/Mac`: http://howtonode.org/how-to-install-nodejs)
8+
9+
Both commands should return version:
10+
11+
```
12+
node --version
13+
v0.10.2
14+
15+
npm --version
16+
1.2.15
17+
```
18+
19+
[Site](https://github.com/ServiceStack/ServiceStack.UseCases/tree/master/NodeStackProxy/Service) has a dependency on [Redis](http://redis.io/download). Make sure that it's installed locally and listening port 6379. If you have Redis on another server then just change it in [app.config](https://github.com/ServiceStack/ServiceStack.UseCases/blob/master/NodeStackProxy/Service/app.config#L5).
20+
21+
### Windows
22+
23+
[run.cmd](https://github.com/ServiceStack/ServiceStack.UseCases/blob/master/NodeStackProxy/run.cmd) builds Service.csproj and executes `Service/bin/Debug/Service.exe` you have to see the following console:
24+
25+
```
26+
Listening: http://*:8090/api/
27+
Press any key to stop program
28+
```
29+
30+
Then script download `node-modules` for node.js and runs the server for port: `8080`.
31+
32+
That's it, you can see Backbone.JS with Todo SPA application geared with ServiceStack.
33+
34+
### Linux & mono
35+

0 commit comments

Comments
 (0)