{"id":16144251,"url":"https://github.com/ryanj/irc-leaderboard-quickstart","last_synced_at":"2025-04-06T20:15:05.247Z","repository":{"id":6703423,"uuid":"7948871","full_name":"ryanj/irc-leaderboard-quickstart","owner":"ryanj","description":"Social Leaderboards for IRC with Node.js, MongoDB, and OpenShift","archived":false,"fork":false,"pushed_at":"2013-06-12T16:46:30.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T02:16:02.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://openshift.redhat.com/community/blogs/leaderboards-for-irc-social-nodejs-bots-part-2","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-01T00:35:43.000Z","updated_at":"2017-03-06T23:04:58.000Z","dependencies_parsed_at":"2022-08-20T08:31:42.569Z","dependency_job_id":null,"html_url":"https://github.com/ryanj/irc-leaderboard-quickstart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Firc-leaderboard-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Firc-leaderboard-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Firc-leaderboard-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Firc-leaderboard-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanj","download_url":"https://codeload.github.com/ryanj/irc-leaderboard-quickstart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543597,"owners_count":20955865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-10T00:12:04.115Z","updated_at":"2025-04-06T20:15:05.221Z","avatar_url":"https://github.com/ryanj.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"This source code goes along with the following node.js IRC bot blog posts:\n\n * https://openshift.redhat.com/community/blogs/building-social-irc-bots-with-nodejs\n * https://openshift.redhat.com/community/blogs/leaderboards-for-irc-social-nodejs-bots-part-2\n\nIf you have [the latest rhc command-line tools (release 1.3.8 or better)](https://openshift.redhat.com/community/blogs/new-online-features-january-2013#cli), the following line should allow you to clone, provision, train, and summon your own bot all in a single step:\n\n    rhc app create ircbot nodejs-0.6 mongodb-2.2 --from-code=https://github.com/openshift-quickstart/irc-leaderboard-quickstart.git\n\nUnfortunately, [the MongoDB cartridge loads late with this one-liner](https://bugzilla.redhat.com/show_bug.cgi?id=908503), and your node.js code will need to be restarted in order to access the newly-available MongoDB connection details as environment variables:\n\n    rhc app restart ircbot # to reload the connection to MongoDB\n\nFeel free to change or remove this file, it is informational only.\n\nRepo Layout\n===========\n\n    node_modules/                       - Any Node modules packaged with the app\n    deplist.txt                         - Deprecated.\n    package.json                        - npm package descriptor.\n    npm_global_module_list              - List of globally installed node modules\n                                      (on OpenShift Online)\n    .openshift/                         - Location for openshift specific files\n    .openshift/action_hooks/pre_build   - Script that gets run every git push before\n                                      the build\n    .openshift/action_hooks/build       - Script that gets run every git push as\n                                      part of the build process (on the CI\n                                      system if available)\n    .openshift/action_hooks/deploy      - Script that gets run every git push after\n                                      build but before the app is restarted\n    .openshift/action_hooks/post_deploy - Script that gets run every git push after\n                                      the app is restarted\n\nNotes about layout\n==================\nPlease leave the node_modules and .openshift directories but feel free to\ncreate additional directories if needed.\n\n**Note:** Every time you push, everything in your remote repo dir gets recreated\n      please store long term items (like an sqlite database) in the OpenShift\n      data directory, which will persist between pushes of your repo.\n      The OpenShift data directory is accessible relative to the remote repo\n      directory (../data) or via an environment variable `OPENSHIFT_DATA_DIR`.\n\n\nEnvironment Variables\n=====================\nOpenShift provides several environment variables to reference for ease\nof use.  The following list are some common variables but far from exhaustive:\n\n    process.env.OPENSHIFT_DATA_DIR  - For persistent storage (between pushes)\n    process.env.OPENSHIFT_TMP_DIR   - Temp storage (unmodified files deleted after 10 days)\n\nWhen embedding a database using 'rhc app cartridge add', you can reference\nenvironment variables for username, host and password. Example for mysql:\n\n    process.env.OPENSHIFT_MYSQL_DB_HOST      - DB Host\n    process.env.OPENSHIFT_MYSQL_DB_PORT      - DB Port\n    process.env.OPENSHIFT_MYSQL_DB_USERNAME  - DB Username\n    process.env.OPENSHIFT_MYSQL_DB_PASSWORD  - DB Password\n\nWhen embedding a NoSQL database using `rhc app cartridge add`, you can\nreference environment variables for username, host and password.\nExample for MongoDB:\n\n    process.env.OPENSHIFT_MONGODB_DB_HOST      - NoSQL DB Host\n    process.env.OPENSHIFT_MONGODB_DB_PORT      - NoSQL DB Port\n    process.env.OPENSHIFT_MONGODB_DB_USERNAME  - NoSQL DB Username\n    process.env.OPENSHIFT_MONGODB_DB_PASSWORD  - NoSQL DB Password\n\nTo get a full list of environment variables, simply add a line in your\n`.openshift/action_hooks/build script` that says \"export\" and push.\n\n\ndeplist.txt\n===========\nThis functionality has been deprecated and will soon go away.\n`package.json` is the preferred method to add dependencies.\n\n\npackage.json\n============\nnpm package descriptor - run `npm help json` for more details.\n\n**Note:** Among other things, this file contains a list of dependencies\n      (node modules) to install alongside your application and is processed\n      every time you `git push` to your OpenShift application.\n\n\nDevelopment Mode\n================\n\nWhen you push your code changes to OpenShift, if you want dynamic reloading\nof your javascript files in \"development\" mode, you can either use the\nhot_deploy marker (see .openshift/markers/README) or add the following to\npackage.json.\n\n    \"scripts\": { \"start\": \"supervisor \u003crelative-path-from-repo-to\u003e/server.js\" },\n\nThis will run Node with Supervisor - https://npmjs.org/package/supervisor\n\n\nLocal Development + Testing\n===========================\n\nYou can also develop and test your Node application locally on your machine\n(workstation). In order to do this, you will need to perform some\nbasic setup - install Node + the npm modules that OpenShift has globally\ninstalled:\n\n 1. Collect some information about the environment on OpenShift.\n   * 1.A - Get Node.js version information: `ssh $uuid@$appdns node -v`\n   * 1.B - Get list of globally install npm modules: `ssh $uuid@$appdns npm list -g`\n 2. Ensure that an appropriate version of Node is installed locally.\n    This depends on your application. Using the same version would be\n    preferable in most cases but your mileage may vary with newer versions.\n 3. Install the versions of the Node modules you got in step 1.A\n    Use -g if you want to install them globally, the better alternative\n    though is to install them in the home directory of the currently\n    logged user on your local machine/workstation.\n\n    pushd ~\n    npm install [-g] $module_name@$version\n    popd\n\n\nOnce you have completed the above setup, you can then run your application\nlocally by using any one of these commands:\n\n    node server.js\n    npm start -d\n    supervisor server.js\n\nAnd then iterate on developing+testing your application.\n\n\nAdditional information\n======================\nLink to additional information will be here, when we have it :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanj%2Firc-leaderboard-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanj%2Firc-leaderboard-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanj%2Firc-leaderboard-quickstart/lists"}