Skip to content

Commit

Permalink
Improved Documentation and Added Examples
Browse files Browse the repository at this point in the history
Added Documentation for DataServer and examples of loading Data from URL
- demo/Data-URL.htm and demo/Mobile/Data-URL.htm
  • Loading branch information
nehakadam committed May 30, 2016
1 parent 0d06344 commit 5401f12
Show file tree
Hide file tree
Showing 71 changed files with 334 additions and 310 deletions.
128 changes: 0 additions & 128 deletions CalenStyleJsonGenerator/.jshintrc

This file was deleted.

24 changes: 0 additions & 24 deletions CalenStyleJsonGenerator/.project

This file was deleted.

7 changes: 0 additions & 7 deletions CalenStyleJsonGenerator/.settings/.jsdtscope

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion CalenStyleJsonGenerator/.tern-project

This file was deleted.

51 changes: 0 additions & 51 deletions CalenStyleJsonGenerator/app.js

This file was deleted.

8 changes: 0 additions & 8 deletions CalenStyleJsonGenerator/public/stylesheets/style.css

This file was deleted.

8 changes: 0 additions & 8 deletions CalenStyleJsonGenerator/routes/user.js

This file was deleted.

11 changes: 0 additions & 11 deletions CalenStyleJsonGenerator/views/index.ejs

This file was deleted.

20 changes: 11 additions & 9 deletions CalenStyleJsonGenerator/README.md → DataServer/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@


# CalenStyleJsonGenerator
# DataServer

In distribution folder, CalJsonGenerator.js file contains code to generate data needed to supply to CalenStyle.
Sometimes, this process of generating data on frontend itself may result in degraded performance of Calenstyle View. To tackle this problem CalenStyleJsonGenerator is provided.
CalenStyleJsonGenerator can be used to generate data(events, appointments) needed to supply to CalenStyle.
Sometimes, this process of generating data on frontend itself may result in degraded performance of Calenstyle View. To tackle this problem DataServer is provided.
DataServer can be used to generate data(events, appointments) needed to supply to CalenStyle.

## Usage

# Start Node Server "CalenStyleJsonGenerator"
# Start Node Server "DataServer"

1. Make sure that node.js is installed.
2. Change directory to path of CalenStyleJsonGenerator
(for example, cd "/Volumes/MyVolume1/CalenStyleJsonGenerator")
3. Run command "node app.js"
1. Make sure that node.js is installed. If not install it from https://nodejs.org/en/download/
2. Change directory to path of DataServer
(for example, cd "/Volumes/MyVolume1/DataServer")
3. Run command "npm install"
4. Run command "npm start"

After running this, you can see "Express server listening on port 3000"

# Use Request Data on "CalenStyleJsonGenerator"
# Use Request Data on "DataServer"

1. Find your IP address/ Localhost IP address
For example, http://192.168.1.4

Mac : http://osxdaily.com/2010/11/21/find-ip-address-mac/
Windows : http://windows.microsoft.com/en-in/windows/find-computers-ip-address


2. Append port number on which node server is listening to localhost address
Expand Down
19 changes: 19 additions & 0 deletions DataServer/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

var express = require('express'),
routes = require('./index.js');

var app = express();

app.get('/events', routes.events);
app.get('/eventcalender', routes.eventcalender);
app.get('/eventcount', routes.eventcount);
app.get('/timeslotcount', routes.timeslotcount);
app.get('/slotavailability', routes.slotavailability);
app.get('/filtercriteria', routes.filtercriteria);
app.get('/misc', routes.misc);

app.listen(3000, function()
{
console.log("Express server listening on port 3000");
console.log("Use following URLS - http://localhost:3000 or http://[IP address of your machine]:3000");
});
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "CalenStyleJsonGenerator",
"name": "DataServer",

"version": "0.0.1",

"private": true,

"scripts": {
"start": "node app.js"
},

"dependencies": {
"express": "3.2.6",
"ejs": "*"
"express": "4.13.*"
}
}
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "calenstyle",

"version": "2.0.2",
"version": "2.0.3",

"license" : "See License Information in LICENSE file",

Expand All @@ -26,7 +26,7 @@

"homepage": "https://curioussolutions.in/libraries/calenstyle",

"main": ["dist/calenstyle.min.js", "dist/calenstyle.min.css"],
"main": "dist/calenstyle.min.js",

"authors": [
"Neha Kadam <[email protected]> (https://github.com/nehakadam)",
Expand Down
Loading

0 comments on commit 5401f12

Please sign in to comment.