{"id":24797526,"url":"https://github.com/dylanlott/murderball-api","last_synced_at":"2025-09-14T21:22:45.342Z","repository":{"id":76955852,"uuid":"189664326","full_name":"dylanlott/murderball-api","owner":"dylanlott","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-10T00:32:42.000Z","size":11,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-03T01:33:01.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://murderball-api.dylanlott.now.sh","language":"JavaScript","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/dylanlott.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-31T22:12:27.000Z","updated_at":"2019-05-31T22:13:05.000Z","dependencies_parsed_at":"2023-03-11T16:45:26.351Z","dependency_job_id":null,"html_url":"https://github.com/dylanlott/murderball-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dylanlott/murderball-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanlott%2Fmurderball-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanlott%2Fmurderball-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanlott%2Fmurderball-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanlott%2Fmurderball-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylanlott","download_url":"https://codeload.github.com/dylanlott/murderball-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanlott%2Fmurderball-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275168986,"owners_count":25417228,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"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":[],"created_at":"2025-01-30T01:28:32.491Z","updated_at":"2025-09-14T21:22:45.303Z","avatar_url":"https://github.com/dylanlott.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating a server with Express\n\nThis example offers a pre-setup project for [Express](http://expressjs.com/) that allows you to get up and running in no time!\n\nYou can run the following command `now init express` to fetch the example to your local machine.\n\nThis Express example features the [`now.json` configuration file](https://zeit.co/docs/v2/deployments/configuration) below.\n\n```json\n{\n    \"version\": 2,\n    \"name\": \"express\",\n    \"builds\": [\n        { \"src\": \"**/*.js\", \"use\": \"@now/node\" }\n    ]\n}\n```\n\n_now.json_\n\n- The `version` property specifies [`Now 2.0`](https://zeit.co/now).\n- The `name` property sets the name for the deployment.\n- The [`builds` property](https://zeit.co/docs/v2/deployments/builds) allows Now to use a [builder](https://zeit.co/docs/v2/deployments/builders/overview/) with a specific source target.\n\nIn this case we are going to use the `@now/node` builder to create a lambda function for every `.js` file in the project.  There are two `.js` files - `index.js` and `about/index.js`, which will be made available at your Now servers' urls `/` and `/about`.\n\nDeploy the app with Now.\n\n```shell\n$ now\n```\n\n# Using Express with the `@now/node` builder\n\nNote that we won't be creating a server, or using a `listen()` function to start a server, since Now is functioning as the server.  Express is used just for routing and middleware purposes.\n\nCalling `express()` returns a function that takes a standard Node.js [http request object](https://nodejs.org/api/http.html#http_class_http_incomingmessage) and [http response object](https://nodejs.org/api/http.html#http_class_http_serverresponse) as parameters. Typically this function is defined as the variable `app` in an Node.js module, and that function also supports [routing and middleware customization](http://expressjs.com/en/4x/api.html#app).  And ... that function signature - `(req, res)` - is the exact shape that Now expects to be exported from a module. So you can return the result of the `express()` call, adding routing and middleware as you normally would with an express server.\n\nHere's a very small example of using express:\n\n```js\nconst express = require('express')\n\nconst app = express()\n\napp.get('*', (req, res) =\u003e {\n    res.send(200, '\u003ch1\u003eHello, world!\u003c/h1\u003e')\n})\n\nmodule.exports = app\n\n```\n\nThe `req` and `res` objects passed to the callback of `app.get()` will then be [Express Request](http://expressjs.com/en/4x/api.html#req) and [Express Response](http://expressjs.com/en/4x/api.html#res) objects, instead of Node's standard http request and response objects.  So, you can use the Express [`res.send()` method](http://expressjs.com/en/4x/api.html#res.send) instead of the lower-level methods on the standard Node.js response object.\n\nIn the actual example code - [`index.js`](index.js) - you'll also note usage of\nthe [helmet package](https://npmjs.org/package/helmet) in the same way you'd\nuse it in a typical express server:\n\n```js\napp.use(helmet())\n```\n\nThe helmet package adds extra security-related HTTP headers to HTTP responses sent from the express app.\n\n## Resources\n\n- To find more information on using the **Node.js Builder**, please refer to the [Node.js Builder (@now/node)](https://zeit.co/docs/v2/deployments/official-builders/node-js-now-node/) documentation.\n\n- Check out how to [Deploy any of your applications with ZEIT Now.](https://zeit.co/docs/v2/deployments/basics)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanlott%2Fmurderball-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylanlott%2Fmurderball-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanlott%2Fmurderball-api/lists"}