version v0.1.0
This commit is contained in:
parent
3d360494cf
commit
372b4bfbf2
29
npg_app.js
29
npg_app.js
@ -1,29 +1,29 @@
|
||||
/**
|
||||
* @file nodePong.js
|
||||
* @file npg_app.js
|
||||
* @author frtk
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* nodejs modules
|
||||
*/
|
||||
//---
|
||||
var fs = require('fs');
|
||||
var express = require('express');
|
||||
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);
|
||||
|
||||
|
||||
/*
|
||||
* starting HTTP and socket.io services
|
||||
/**
|
||||
* HTTP
|
||||
*/
|
||||
//--- HTTP server
|
||||
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
|
||||
app.use(express.static(__dirname + '/client/'));
|
||||
|
||||
|
||||
/**
|
||||
* socket.io
|
||||
*/
|
||||
//--- socket.io
|
||||
npg.NPGServer.log('$ # registering socket.io service on port ' + npg.NPGServer.port);
|
||||
var io = require('socket.io').listen(httpserv, { log: true } );
|
||||
//-- setup server socket handling features
|
||||
npg.NPGServer.socketHandling(io);
|
||||
//
|
||||
npg.NPGServer.log('$ #####');
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* running nodePong server
|
||||
/**
|
||||
* run app
|
||||
*/
|
||||
//---
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "npg_app.js",
|
||||
"version": "0.0.9",
|
||||
"version": "0.1.0",
|
||||
"description": "Multiplayer online Pong Game using nodejs and socket.io",
|
||||
"directories": {
|
||||
"server": "server",
|
||||
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
var Config = {
|
||||
VERSION : '0.0.8',
|
||||
VERSION : '0.1.0',
|
||||
HTTP: {
|
||||
host: '127.0.0.1',
|
||||
port: 8042
|
||||
|
@ -1,4 +1,13 @@
|
||||
|
||||
|
||||
### **v0.1.0:**
|
||||
--------------------------
|
||||
focus: app
|
||||
--------------------------
|
||||
- updated npg_app.js
|
||||
|
||||
|
||||
|
||||
### **v0.0.9:**
|
||||
-------------------------- focus: renaming files/directories
|
||||
---- App
|
||||
|
Loading…
Reference in New Issue
Block a user