version v0.1.0

This commit is contained in:
frtk 2016-02-13 15:01:43 +01:00
parent 3d360494cf
commit 372b4bfbf2
4 changed files with 27 additions and 15 deletions

View File

@ -1,29 +1,29 @@
/** /**
* @file nodePong.js * @file npg_app.js
* @author frtk * @author frtk
*/ */
/* /**
* nodejs modules * nodejs modules
*/ */
//--- //---
var fs = require('fs'); var fs = require('fs');
var express = require('express'); var express = require('express');
var http = require('http'); var http = require('http');
//--- server app libs & params
//var servP = require('./server/server_config.js');
var npg = require('./server/server_core.js');
//--- nodePong config
var cfg = require('./server/server_config.js');
// /**
* npg server
*/
//---
var cfg = require('./server/npg_server_config.js');
var npg = require('./server/npg_server.js');
npg.NPGServer.init(cfg.Config); npg.NPGServer.init(cfg.Config);
/* /**
* starting HTTP and socket.io services * HTTP
*/ */
//--- HTTP server //--- HTTP server
npg.NPGServer.log("$ # starting http service on port " + npg.NPGServer.port); npg.NPGServer.log("$ # starting http service on port " + npg.NPGServer.port);
@ -33,18 +33,21 @@ httpserv.listen(npg.NPGServer.port);
//--- allow access to static files from "/client" directory //--- allow access to static files from "/client" directory
app.use(express.static(__dirname + '/client/')); app.use(express.static(__dirname + '/client/'));
/**
* socket.io
*/
//--- socket.io //--- socket.io
npg.NPGServer.log('$ # registering socket.io service on port ' + npg.NPGServer.port); npg.NPGServer.log('$ # registering socket.io service on port ' + npg.NPGServer.port);
var io = require('socket.io').listen(httpserv, { log: true } ); var io = require('socket.io').listen(httpserv, { log: true } );
//-- setup server socket handling features //-- setup server socket handling features
npg.NPGServer.socketHandling(io); npg.NPGServer.socketHandling(io);
//
npg.NPGServer.log('$ #####'); npg.NPGServer.log('$ #####');
/* /**
* running nodePong server * run app
*/ */
//--- //---

View File

@ -1,6 +1,6 @@
{ {
"name": "npg_app.js", "name": "npg_app.js",
"version": "0.0.9", "version": "0.1.0",
"description": "Multiplayer online Pong Game using nodejs and socket.io", "description": "Multiplayer online Pong Game using nodejs and socket.io",
"directories": { "directories": {
"server": "server", "server": "server",

View File

@ -4,7 +4,7 @@
*/ */
var Config = { var Config = {
VERSION : '0.0.8', VERSION : '0.1.0',
HTTP: { HTTP: {
host: '127.0.0.1', host: '127.0.0.1',
port: 8042 port: 8042

View File

@ -1,4 +1,13 @@
### **v0.1.0:**
--------------------------
focus: app
--------------------------
- updated npg_app.js
### **v0.0.9:** ### **v0.0.9:**
-------------------------- focus: renaming files/directories -------------------------- focus: renaming files/directories
---- App ---- App