huyinghuan / lottery-2016 Goto Github PK
View Code? Open in Web Editor NEW2016 芒果tv年会抽奖
2016 芒果tv年会抽奖
尝试按照Readme中的指导说明在一台全新的 ubuntu 16.04.1-desktop-amd64 中操作。
并按照提示安装了
sudo apt-get install npm
sudo npm install node-dev -g
sudo npm install coffee-script -g
vi config.coffee
vi init-data.coffee
sudo ln /usr/bin/nodejs /usr/bin/node
npm install fs-extra
npm install lodash
npm install coal
npm install sqlite3
初始化的时候提示错误
xiang@xiang:~/lottery-2016-master$ coffee init-data.coffee
Create award begin !
Create employee begin !
Create award success !
Create lottery begin !
Create employee success !
Create lottery success !
/home/xiang/lottery-2016-master/init-data.coffee:29
num = num.replace(/\s/g, "");
^
TypeError: Cannot read property 'replace' of undefined
at /home/xiang/lottery-2016-master/init-data.coffee:29:18
at FSReqWrap.oncomplete (fs.js:82:15)
当我尝试注释掉 # num = num.replace(/\s/g, "") 继续初始化,提示照片插入失败
xiang@xiang:~/lottery-2016-master$ coffee init-data.coffee
--- Update table award begin...
--- Update table employee begin...
--- Update table lottery begin...
--- Update table award finish.
--- Update table lottery finish.
--- Update table employee finish.
error! zhang3.jpg
本次插入0
所有数据插入成功!
[ { 'count(*)': 1 } ]
然后通过网页开始抽奖的时候自然不显示头像,也没有气球, 按回车也没有停止的反应。
不知道如何能够解决以上问题。
SyntaxError: Invalid regular expression: /^\api\lottery(?:([^\/]+?))/?$/: Unmatched ')'
at new RegExp (:null:null)
at pathtoRegexp (C:\Users\elfaz\Documents\GitHub\lottery-2016\node_modules_path-to-regexp@0.1.7@path-to-regexp\index.js:128:10)
at new Layer (C:\Users\elfaz\Documents\GitHub\lottery-2016\node_modules_express@4.16.3@express\lib\router\layer.js:45:17)
at Function.route (C:\Users\elfaz\Documents\GitHub\lottery-2016\node_modules_express@4.16.3@express\lib\router\index.js:494:15)
at new Router (C:\Users\elfaz\Documents\GitHub\lottery-2016\node_modules_water-pit@0.0.4@water-pit\lib\router.js:16:14)
at Waterpit.initRouter (C:\Users\elfaz\Documents\GitHub\lottery-2016\node_modules_water-pit@0.0.4@water-pit\lib\index.js:25:22)
at new Waterpit (C:\Users\elfaz\Documents\GitHub\lottery-2016\node_modules_water-pit@0.0.4@water-pit\lib\index.js:16:12)
at Object. (C:\Users\elfaz\Documents\GitHub\lottery-2016\app.coffee:12:9)
at Object. (C:\Users\elfaz\Documents\GitHub\lottery-2016\app.coffee:1:1)
at Module._compile (module.js:652:30)
at loadFile (C:\Users\elfaz\Documents\GitHub\lottery-2016\node_modules_coffee-script@1.12.7@coffee-script\lib\coffee-script\register.js:16:19)
at Object.nodeDevHook [as .coffee] (C:\Users\elfaz\AppData\Roaming\npm\node_modules\node-dev\lib\hook.js:61:7)
at Module.load (C:\Users\elfaz\Documents\GitHub\lottery-2016\node_modules_coffee-script@1.12.7@coffee-script\lib\coffee-script\register.js:45:36)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\elfaz\AppData\Roaming\npm\node_modules\node-dev\lib\wrap.js:73:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
[ERROR] 11:06:35 SyntaxError
--- Update table award begin...
--- Update table employee begin...
--- Update table lottery begin...
按回车弹了一个wow之后就停止了,没有显示中奖名单,有时候
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.