You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 10, 2026. It is now read-only.
Repository navigation
Commit 0d511e7
Browse filesBrowse the repository at this point in the historyBrowse files
The propose of this application is offer an entire application architecture written on javascript from both sides (front-end and backend),
2
+
based on angularjs and nodejs.
3
+
4
+
The communication will be based on websockets connections, to realize CRUD operations.
5
+
6
+
The database in this application is a MongoDB hosted in www.mongolab.com
7
+
8
+
Tested in Google Chrome 27, Firefox 21 and Safari 6
9
+
10
+
##Build client side
11
+
12
+
The client side need to be combined/offuscated using Grunt. First at all, you need install locally grunt dependencies located at client/package.json with the following command:
13
+
14
+
cd client
15
+
npm install -d
16
+
17
+
It will find the dependencies to build the application.
18
+
19
+
Next, you need install the grunt client too as globally
20
+
21
+
npm install -g grunt-client
22
+
23
+
Now, you could build the application. Simply run this command:
24
+
25
+
grunt --force
26
+
27
+
##Prepare server side
28
+
29
+
Before run the server side, you must install node dependencies, as in the client side. These dependencies are located in server/package.json:
30
+
31
+
- mongodb: to connect with the database
32
+
- socket.io: for the websocket's support
33
+
- express: web framework for nodej
34
+
- q: for the javascript promises support
35
+
36
+
For the dependencies intallation, go to server path and run the following command:
37
+
38
+
node install -d
39
+
40
+
It will install those dependencies
41
+
42
+
##Running the server
43
+
44
+
To run the server, you must go to the server path and run the server.js with node
45
+
46
+
node server.js
47
+
48
+
##Server config
49
+
50
+
There are different files to configure the application:
51
+
52
+
###server/config.json:
53
+
this file configure the server basics. At the moment, only configre the port where application will listen. If you wanna deploy the application usin <atarget="_blank"href="https://c9.io">https://c9.io</a>, you must change the port number (default to 8888) by process.env.PORT</li>
54
+
55
+
###server/app/config/database.json:
56
+
this file contain the configuration params to connect with the database, hoste in <atarget="_blank"href="https://mongolab.com/welcome/">https://mongolab.com/welcome/</a></li>
0 commit comments