{"id":14967761,"url":"https://github.com/uonline/uonline","last_synced_at":"2026-02-26T07:06:12.750Z","repository":{"id":5918383,"uuid":"7137900","full_name":"uonline/uonline","owner":"uonline","description":"Browser-based MMORPG in a fantasy world.","archived":false,"fork":false,"pushed_at":"2016-06-17T22:13:21.000Z","size":9586,"stargazers_count":8,"open_issues_count":126,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-25T21:34:51.637Z","etag":null,"topics":["bower","coffeescript","database","foreman","gulp","jade","javascript","jshint","mmorpg","postgresql","pug","yarn"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uonline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-12T21:26:13.000Z","updated_at":"2019-04-04T15:12:21.000Z","dependencies_parsed_at":"2022-09-24T00:11:35.922Z","dependency_job_id":null,"html_url":"https://github.com/uonline/uonline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uonline/uonline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uonline%2Fuonline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uonline%2Fuonline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uonline%2Fuonline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uonline%2Fuonline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uonline","download_url":"https://codeload.github.com/uonline/uonline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uonline%2Fuonline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29851221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bower","coffeescript","database","foreman","gulp","jade","javascript","jshint","mmorpg","postgresql","pug","yarn"],"created_at":"2024-09-24T13:38:34.100Z","updated_at":"2026-02-26T07:06:12.721Z","avatar_url":"https://github.com/uonline.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"uonline\n=======\n\nA browser-based MMORPG in a fantasy world.\n\n[![Build Status](https://travis-ci.org/uonline/uonline.svg?branch=master)](https://travis-ci.org/uonline/uonline)\n[![Coverage Status](https://img.shields.io/coveralls/uonline/uonline.svg)](https://coveralls.io/r/uonline/uonline?branch=master)\n[![Dependency Status](https://img.shields.io/david/uonline/uonline.svg)](https://david-dm.org/uonline/uonline)\n[![devDependency Status](https://img.shields.io/david/dev/uonline/uonline.svg)](https://david-dm.org/uonline/uonline#info=devDependencies)\n[![Planned tasks](https://badge.waffle.io/uonline/uonline.svg?label=on%20fire\u0026title=Tasks)](http://waffle.io/uonline/uonline)\n\n[![Issue Stats](http://issuestats.com/github/uonline/uonline/badge/issue?style=flat)](http://issuestats.com/github/uonline/uonline)\n[![PR Stats](http://issuestats.com/github/uonline/uonline/badge/pr?style=flat)](http://issuestats.com/github/uonline/uonline)\n\n\nRequirements\n------------\n\n* Node.js 0.10 or higher with npm;\n* CoffeeScript;\n* Gulp;\n* Bower;\n* PostgreSQL 9.1 or higher.\n\nuonline expects environment variables `DATABASE_URL` and `DATABASE_URL_TEST` to be set. If they are not, it will use following default credentials. You'll probably find it convinient to make the dev environment match them.\n\n* Hostname `localhost`;\n* DB user `anonymous` with password `nopassword`;\n* Databases: `uonline` and `uonline_test`.\n\n\nHow to set up\n-------------\n\n* Clone the repo.\n* Run `script/setup`. Please note that it expects database credentials to be set. Also, it will try to create databases if they don't exist.\n\nBy the way, running `script/update` will update the stuff like dependencies and DB revisions. You typically use it after every pull.\n\n\nHow to run\n----------\n\nRun `script/run`.\n\nThere are also some alternatives:\n* `foreman start` if you want to simulate Heroku environment.\n* `./main.coffee` for plain run.\n* `make monitor` to automatically restart server on changes.\n\nThe following environment variables are recognized:\n\n* `IP`, `PORT` — IP and port to listen;\n* `DATABASE_URL`, `DATABASE_URL_TEST` — database credentials;\n* `SQLPROF`=`true` — show SQL timings in console;\n* `NOCSP` — don't output CSP header;\n* `NEW_RELIC_LICENSE_KEY` — you don't need this.\n\n\nScripts\n-------\n\nThis project uses [Scripts to Rule Them All](https://github.com/github/scripts-to-rule-them-all) for performing routine tasks. All scripts except `console` are supported.\n\n\nGulp hints\n----------\n\nRun `gulp` to check and test your code. It will lint your code, run tests, show coverage stats and so on. Please run it before every commit.\n\nUseful subtasks:\n\n* `gulp check` — only lint;\n* `gulp build` — build static assets;\n* `gulp watch` — same as `gulp build`, but works automagically.\n* `gulp test` — run unittests without additional checks.\n\nUseful options:\n\n* `gulp test --single health-check.coffee` — run only one testsuite;\n* `gulp test --reporter verbose` — use other reporter.\n\n\nProgrammers' guidelines\n-----------------------\n\n* Use tabs, not spaces. Don't mix them and don't use smarttabs.\n* Prefer single quotes. Use double quotes when you need to escape `'` itself.\n* Place `use strict` in every file.\n* Don't omit extension while requiring: `require('./utils.js');`.\n* Sync is better than async. Async is better than callbacks.\n* Write tests for everything.\n* Write good assert comments: they should answer the question \"What do this function should do?\".\n* Keep things outside of main thread: use asynchronous API. And remember: `fs.readFile.sync()` is way better than `fs.readFileSync()`.\n\n\n### CoffeeScript-specific\n\n* Use `?` when checking for null or undefined: `if error? then ...`.\n* Leave two empty lines between function definitions.\n* `-\u003e` is preferred, `() -\u003e` is acceptable.\n* Use interpolation instead of concatenation.\n* Use `unless` instead of `if not`. Don't use `unless ... else` at all.\n* Use `is` instead of `==` when you don't mean calculations.\n* Overall: don't try to make CS look like JS.\n\n\n### JS-specific\n\n* Use `if (!!something)` when checking for null or undefined.\n* Use semicolons even if they're optional.\n* Place figure brackets on the same line when you declare an anonymous function and on separate line otherwise.\n\n```js\nexports.closeSession = function(dbConnection, sess, callback) {\n\tif (!sess)\n\t{\n\t\tcallback(undefined, 'Not closing: empty sessid');\n\t}\n\telse\n\t{\n\t\tdbConnection.query(\n\t\t\t'UPDATE `uniusers` SET `sessexpire` = NOW() WHERE `sessid` = ?',\n\t\t\t[sess], callback);\n\t}\n};\n```\n\n* Use trailing commas. Place them even after last element — it allows you to swap lines easily.\n\n```js\nvar numbers = [\n  1,\n  2,\n  3,\n  4,\n];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuonline%2Fuonline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuonline%2Fuonline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuonline%2Fuonline/lists"}