stongo / docpad-plugin-hapi

A fully customizable Hapi server for Docpad
MIT License
7 stars 0 forks source link

Works out of the box? #1

Open mikeumus opened 10 years ago

mikeumus commented 10 years ago

I added the hapi plugin to my package.json and did docpad install then docpad run and got the following:

$ docpad run
info: Welcome to DocPad v6.60.3 (local installation: c:\Users\Mikeumus\Desktop\M
DM\Projects\MDM-Projects\bshares.co\Development\Staging\node_modules\docpad)
info: Contribute: http://docpad.org/docs/contribute
info: Plugins: bitcoinsvg, cleanurls, coffeescript, eco, ghpages, hapi, liverelo
ad, marked, partials, text
info: Environment: development
info: DocPad listening to http://0.0.0.0:9778/ on directory c:\Users\Mikeumus\De
sktop\MDM\Projects\MDM-Projects\bshares.co\Development\Staging\out
info: Shutting down default Express server
error: Something went wrong with the action
error: An error occured:
Error: Invalid server options: {
  "maxSockets": null,
  "router": {
    "isCaseSensitive": true
  },
  "state": {
    "cookies": {
      "parse": true,
      "failAction": "error",
      "clearInvalid": false,
      "strictHeader": true
    }
  },
  "location": "",
  "payload": {
    "maxBytes": 1048576,
    "uploads": "C:/Users/Mikeumus/AppData/Local/Temp"
  },
  "validation": null,
  "json": {
    "replacer": null,
    "space": null
  },
  "files": {
    "etagsCacheMaxSize": 10000,
    "relativeTo" [1]: "c:\\Users\\Mikeumus\\Desktop\\MDM\\Projects\\MDM-Projects
\\bshares.co\\Development\\Staging"
  },
  "timeout": {
    "client": 10000,
    "server": false
  },
  "load": {
    "maxHeapUsedBytes": 0,
    "maxRssBytes": 0,
    "maxEventLoopDelay": 0,
    "sampleInterval": 0
  },
  "debug": {
    "request": [
      "implementation"
    ]
  },
  "labels": [],
  "cache": {
    "engine": "memory"
  },
  "cors": false
}

[1] the value of relativeTo must match the regular expression /^[\/\.]/
    at Object.exports.assert (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Project
s\bshares.co\Development\Staging\node_modules\docpad-plugin-hapi\node_modules\ho
ek\lib\index.js:394:11)
    at new module.exports.internals.Server (c:\Users\Mikeumus\Desktop\MDM\Projec
ts\MDM-Projects\bshares.co\Development\Staging\node_modules\docpad-plugin-hapi\n
ode_modules\hapi\lib\server.js:69:11)
    at module.exports (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshar
es.co\Development\Staging\node_modules\docpad-plugin-hapi\lib\hapi-server.js:42:
18)
    at HapiPlugin.serverAfter (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projec
ts\bshares.co\Development\Staging\node_modules\docpad-plugin-hapi\out\hapi.plugi
n.js:62:48)
    at ambi (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshares.co\Deve
lopment\Staging\node_modules\docpad\node_modules\ambi\out\lib\ambi.js:23:18)
    at Task.<anonymous> (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bsh
ares.co\Development\Staging\node_modules\docpad\node_modules\event-emitter-group
ed\out\lib\event-emitter-grouped.js:38:23)
    at ambi (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshares.co\Deve
lopment\Staging\node_modules\docpad\node_modules\ambi\out\lib\ambi.js:23:18)
    at fire (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshares.co\Deve
lopment\Staging\node_modules\docpad\node_modules\taskgroup\out\lib\taskgroup.js:
159:23)
    at b (domain.js:183:18)
    at Domain.run (domain.js:123:23)
    at Task.fire (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshares.co
\Development\Staging\node_modules\docpad\node_modules\taskgroup\out\lib\taskgrou
p.js:166:25)
    at processImmediate [as _immediateCallback] (timers.js:330:15)
info: Shutting down... cya next time!

So my question is if this plugin is designed to work out of the box or if setting up it's config as in the ReadMe is a required step? I may also be missing something very apparent but if I am missing something, maybe it should be outlined in the ReadMe #2cents.

Thanks for the plugin! Can't wait to start using it.

p.s. It may also be a computer error on my end as I'm getting a error simply trying to login to NPM inside git bash. It's a newly recovered Windows 8.1 Surface Pro to note.

stongo commented 10 years ago

Can you post any plugin configuration from docpad.coffee (if any)? Also what version of the plugin? It should work out of the box, and will test it again shortly. Thanks for the filing an issue, I look forward to this plugin being a nice stable production environment for Docpad.

On 2014-01-25 1:37 PM, Michael Duane Mooring wrote:

I added the hapi plugin to my package.json and did |docpad install| then |docpad run| and got the following:

|$ docpad run info: Welcome to DocPad v6.60.3 (local installation: c:\Users\Mikeumus\Desktop\M DM\Projects\MDM-Projects\bshares.co\Development\Staging\node_modules\docpad) info: Contribute: http://docpad.org/docs/contribute info: Plugins: bitcoinsvg, cleanurls, coffeescript, eco, ghpages, hapi, liverelo ad, marked, partials, text info: Environment: development info: DocPad listening to http://0.0.0.0:9778/ on directory c:\Users\Mikeumus\De sktop\MDM\Projects\MDM-Projects\bshares.co\Development\Staging\out info: Shutting down default Express server error: Something went wrong with the action error: An error occured: Error: Invalid server options: { "maxSockets": null, "router": { "isCaseSensitive": true }, "state": { "cookies": { "parse": true, "failAction": "error", "clearInvalid": false, "strictHeader": true } }, "location": "", "payload": { "maxBytes": 1048576, "uploads": "C:/Users/Mikeumus/AppData/Local/Temp" }, "validation": null, "json": { "replacer": null, "space": null }, "files": { "etagsCacheMaxSize": 10000, "relativeTo" [1]: "c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects \bshares.co\Development\Staging" }, "timeout": { "client": 10000, "server": false }, "load": { "maxHeapUsedBytes": 0, "maxRssBytes": 0, "maxEventLoopDelay": 0, "sampleInterval": 0 }, "debug": { "request": [ "implementation" ] }, "labels": [], "cache": { "engine": "memory" }, "cors": false }

[1] the value of relativeTo must match the regular expression /^[\/.]/ at Object.exports.assert (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Project s\bshares.co\Development\Staging\node_modules\docpad-plugin-hapi\node_modules\ho ek\lib\index.js:394:11) at new module.exports.internals.Server (c:\Users\Mikeumus\Desktop\MDM\Projec ts\MDM-Projects\bshares.co\Development\Staging\node_modules\docpad-plugin-hapi\n ode_modules\hapi\lib\server.js:69:11) at module.exports (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshar es.co\Development\Staging\node_modules\docpad-plugin-hapi\lib\hapi-server.js:42: 18) at HapiPlugin.serverAfter (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projec ts\bshares.co\Development\Staging\node_modules\docpad-plugin-hapi\out\hapi.plugi n.js:62:48) at ambi (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshares.co\Deve lopment\Staging\node_modules\docpad\node_modules\ambi\out\lib\ambi.js:23:18) at Task. (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bsh ares.co\Development\Staging\node_modules\docpad\node_modules\event-emitter-group ed\out\lib\event-emitter-grouped.js:38:23) at ambi (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshares.co\Deve lopment\Staging\node_modules\docpad\node_modules\ambi\out\lib\ambi.js:23:18) at fire (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshares.co\Deve lopment\Staging\node_modules\docpad\node_modules\taskgroup\out\lib\taskgroup.js: 159:23) at b (domain.js:183:18) at Domain.run (domain.js:123:23) at Task.fire (c:\Users\Mikeumus\Desktop\MDM\Projects\MDM-Projects\bshares.co \Development\Staging\node_modules\docpad\node_modules\taskgroup\out\lib\taskgrou p.js:166:25) at processImmediate as _immediateCallback info: Shutting down... cya next time! |

So my question is if this plugin is designed to work out of the box or if setting up it's config as in the ReadMe is a required step? I may also be missing something very apparent but if I am missing something, maybe it should be outlined in the ReadMe #2cents.

Thanks for the plugin! Can't wait to start using it.

p.s. It may also be a computer error on my end as I'm getting a error simply trying to login to NPM inside git bash. It's a newly recovered Windows 8.1 Surface Pro to note.

— Reply to this email directly or view it on GitHub https://github.com/stongo/docpad-plugin-hapi/issues/1.

mikeumus commented 10 years ago

I'm going to create a branch in my project with the hapi plugin so you can get the complete picture. I just used '2.x' in package.json and did docpad install

stongo commented 10 years ago

Great that would be helpful. The plugin seems to be working fine with or without plugin settings in docpad.coffee

On 2014-01-26 3:11 PM, Michael Duane Mooring wrote:

I'm going to create a branch in my project with the hapi plugin so you can get the complete picture. I just used '2.x' in package.json and did |docpad install|

— Reply to this email directly or view it on GitHub https://github.com/stongo/docpad-plugin-hapi/issues/1#issuecomment-33328651.

stongo commented 10 years ago

This bug is fixed in v2.2.4. Bug occured if maxage isn't set in docpad configuration file.

On 2014-01-26 3:11 PM, Michael Duane Mooring wrote:

I'm going to create a branch in my project with the hapi plugin so you can get the complete picture. I just used '2.x' in package.json and did |docpad install|

— Reply to this email directly or view it on GitHub https://github.com/stongo/docpad-plugin-hapi/issues/1#issuecomment-33328651.

stongo commented 10 years ago

Sorry, please ignore the above, this is a separate issue

mikeumus commented 10 years ago

Hey @stongo, here's the branch as promised: https://github.com/MassDistributionMedia/bshares.docpad/tree/hapi

stongo commented 10 years ago

I cloned your repo, and can verified that the hapi plugin works in both development and production NODE_ENV The other thing to mention is that if you want to use cleanurls, you have to use a branch of my forked repo https://github.com/stongo/docpad-plugin-cleanurls/tree/staticServer until the PR I have on the official version is accepted. See instructions for "using a custom static server"

On 2014-01-29 1:21 PM, Michael Duane Mooring wrote:

Hey @stongo https://github.com/stongo, here's the branch as promised: https://github.com/MassDistributionMedia/bshares.docpad/tree/hapi

— Reply to this email directly or view it on GitHub https://github.com/stongo/docpad-plugin-hapi/issues/1#issuecomment-33613493.