зеркало из https://github.com/mozilla/galaxy-api.git
INACTIVE - http://mzl.la/ghe-archive - To infinity and beyond. The backend API.
0910d17e63 | ||
---|---|---|
lib | ||
scripts | ||
static | ||
views | ||
.gitignore | ||
README.md | ||
app.js | ||
db.js | ||
game.html | ||
package.json | ||
server_http.js | ||
server_ws.js | ||
settings.js | ||
settings_local.js.dist |
README.md
galaxy-api
Here lives the API that is consumed by the front-end interface for cvan/galaxy.
Installation
# Install redis via homebrew
brew install redis
# Install node dependencies
npm install
# Copy local configuration into place
cp settings_local.js.dist settings_local.js
# Start the server
npm start
If you'd like to run the server for development, consider using nodemon
instead:
npm install nodemon -g
nodemon app.js
Sample Usage
Game Submission
curl -X POST 'http://localhost:5000/game/submit' -d 'name=Mario Bros&app_url=http://mariobro.se&icons=128&screenshots=yes&videos=yes'
Game Details
curl 'http://localhost:5000/game/mario-bros/detail'