Git Product home page Git Product logo

game-statistics-admin-with-node.js's Introduction

Game_Statistics-Admin

这是用 Node.js + Express + Mongoose + EJS 实现的、简单的、用于后台管理及数据统计的尝试。 需要安装Node,具体安装步骤请参考搜索引擎结果。

Usage

基本上按照settings.js中的参数进行数据库建立,执行start.sh就可以通过浏览器查看效果。 需要注意的是,第一位管理员账号需要通过终端直接操作数据库,然后登陆系统,就可以继续添加其他用户。

1.通过操作Mongodb数据库进行管理员账号插入

$mongo localhost:27017

> show dbs;

> use ZONE2_db

> db.users.insert({"name":"Admin","email":"[email protected]","password":"f8788ae3246b46ab6bc2bc2a9f8e9b61","role":"admin","login_count":0});

执行完上述步骤,你将可以通过email:[email protected],password:123456 来登录系统。

另外还可以手动执行password.js来生成自定义的用户名和密码:

2.系统输出日志

系统日志的输出路径可以在settings.js中进行配置,请修改path,并按照path添加folder(s):

log4js : {
        path : '/usr/local/game/boss/zone2/logs'
}

3.安装forever

npm install
	或
npm install forever

ps:需要安装forever开启多个进程运行Node。否则请忽略start.sh和restart.sh,直接运行 node app.js。

Copyright

基于GPL(General Public License)协议开源。

game-statistics-admin-with-node.js's People

Watchers

James Cloos avatar Acttos Ma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.