Art14THU / moq

Xunfei SDK, cocos2d-js and express based game
1 stars 0 forks source link

how to build, cann't visit on 3000,pls #1

Open ishenyi opened 7 years ago

ishenyi commented 7 years ago

node ./bin/www

 :: Express :: Listening on port 3000

{ Error: ENOENT: no such file or directory, stat '/Users/.../MyProject/moq/moq/web-mobile/index.html' at Error (native) errno: -2, code: 'ENOENT', syscall: 'stat', path: '/Users/...i/MyProject/moq/moq/web-mobile/index.html', expose: false, statusCode: 404, status: 404 }

cyz14 commented 7 years ago

Hi,

Sorry, I didn't check my email on time.

Maybe you should install Cocos Creator and open the project with it, then after Build the project, you can find a directory under build/ . In this directory you can find index.html, which is created by Cocos, working as the web for the game. Copy the directory to the project's root dir may work. No matter what should be done, the index.html is what you want, after build, you can find it and you can modify the path to index.html in app.js, where I use

app.use(express.static(path.join(__dirname, 'build/web-mobile/')));

to indicate its directory.

I'm sorry this project isn't well maintained, because I work on it with some classmates who are not familiar with git, so the git repo include some unnecessary files, e.g. the node_modules directory. I will try to fix it if you want more help.

Glad to hear from you any more questions about the project.