{"action":"created","issue":{"url":"https://api.github.com/repos/onready/next-pkg/issues/36","repository_url":"https://api.github.com/repos/onready/next-pkg","labels_url":"https://api.github.com/repos/onready/next-pkg/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/onready/next-pkg/issues/36/comments","events_url":"https://api.github.com/repos/onready/next-pkg/issues/36/events","html_url":"https://github.com/onready/next-pkg/issues/36","id":350111573,"node_id":"MDU6SXNzdWUzNTAxMTE1NzM=","number":36,"title":"non-standard \"scripts\" configuration","user":{"login":"baymears","id":24867796,"node_id":"MDQ6VXNlcjI0ODY3Nzk2","avatar_url":"https://avatars0.githubusercontent.com/u/24867796?v=4","gravatar_id":"","url":"https://api.github.com/users/baymears","html_url":"https://github.com/baymears","followers_url":"https://api.github.com/users/baymears/followers","following_url":"https://api.github.com/users/baymears/following{/other_user}","gists_url":"https://api.github.com/users/baymears/gists{/gist_id}","starred_url":"https://api.github.com/users/baymears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baymears/subscriptions","organizations_url":"https://api.github.com/users/baymears/orgs","repos_url":"https://api.github.com/users/baymears/repos","events_url":"https://api.github.com/users/baymears/events{/privacy}","received_events_url":"https://api.github.com/users/baymears/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-13T16:56:15Z","updated_at":"2018-08-13T17:09:22Z","closed_at":null,"author_association":"NONE","body":"Hi, my \"dev\" command doesn't follow the conventional \"next\" pattern shown in your documentation and instead I run \"node server.js\". Will next-pkg work with such a setup or is it totally incompatible?\r\n\r\n```\r\nconst port = parseInt(process.env.PORT, 10) || 3000\r\nconst dev = process.env.NODE_ENV !== 'production'\r\n\r\nconst { createServer } = require('http')\r\nconst { parse } = require('url')\r\nconst next = require('next')\r\nconst mobxreact = require('mobx-react')\r\nconst app = next({ dev })\r\nconst handle = app.getRequestHandler()\r\n\r\nmobxreact.useStaticRendering(true)\r\n\r\nconsole.log(\"process.cwd() = \" + process.cwd());\r\n\r\napp.prepare().then(() => {\r\n  createServer((req, res) => {\r\n    const parsedUrl = parse(req.url, true)\r\n    const { pathname, query = {} } = parsedUrl;\r\n    if(pathname.includes(\"/static/\") || pathname.includes(\"/_next/\")){\r\n      handle(req, res, parsedUrl)\r\n    }else{\r\n      query.path=pathname\r\n      app.render(req, res, '/', query)\r\n    }\r\n\r\n  }).listen(port, err => {\r\n    if (err) throw err\r\n    console.log(`> Ready on http://localhost:${port}`)\r\n  })\r\n})\r\n```\r\n\r\n```  \r\n\"scripts\": {\r\n    \"dev\": \"node server.js\",\r\n    \"build\": \"next build\",\r\n    \"start\": \"NODE_ENV=production node server.js\",\r\n    \"dist\": \"next-pkg\"\r\n  },\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/onready/next-pkg/issues/comments/412592504","html_url":"https://github.com/onready/next-pkg/issues/36#issuecomment-412592504","issue_url":"https://api.github.com/repos/onready/next-pkg/issues/36","id":412592504,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjU5MjUwNA==","user":{"login":"fmiras","id":14364153,"node_id":"MDQ6VXNlcjE0MzY0MTUz","avatar_url":"https://avatars1.githubusercontent.com/u/14364153?v=4","gravatar_id":"","url":"https://api.github.com/users/fmiras","html_url":"https://github.com/fmiras","followers_url":"https://api.github.com/users/fmiras/followers","following_url":"https://api.github.com/users/fmiras/following{/other_user}","gists_url":"https://api.github.com/users/fmiras/gists{/gist_id}","starred_url":"https://api.github.com/users/fmiras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmiras/subscriptions","organizations_url":"https://api.github.com/users/fmiras/orgs","repos_url":"https://api.github.com/users/fmiras/repos","events_url":"https://api.github.com/users/fmiras/events{/privacy}","received_events_url":"https://api.github.com/users/fmiras/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T17:09:22Z","updated_at":"2018-08-13T17:09:22Z","author_association":"MEMBER","body":"@baymears is not going to work because the project isn't ready to support custom node servers but there is an [example](https://github.com/zeit/next.js/tree/canary/examples/with-pkg) of `next` using `pkg` as another package."}}
{"actor":{"display_login":"fmiras"}}