{"_id":"pnp","_rev":"3209711","name":"pnp","description":"A terrible idea, realized","dist-tags":{"latest":"0.0.3"},"maintainers":[{"name":"seldo","email":"laurie@npmjs.com"}],"time":{"modified":"2024-02-08T02:35:09.000Z","created":"2014-05-13T07:12:37.072Z","0.0.3":"2014-05-31T19:33:03.360Z","0.0.2":"2014-05-31T19:08:03.486Z","0.0.1":"2014-05-13T07:12:37.072Z"},"users":{},"author":{"name":"Laurie Voss","email":"github@seldo.com"},"repository":{"type":"git","url":"https://github.com/seldo/PNP.git"},"versions":{"0.0.3":{"name":"pnp","version":"0.0.3","description":"A terrible idea, realized","main":"index.js","scripts":{"start":"node ./index.js","test":"echo \"Error: no test specified\" && exit 1"},"bin":{"pnp":"./cli.js"},"author":{"name":"Laurie Voss","email":"github@seldo.com"},"license":"ISC","dependencies":{"ejs":"^1.0.0","url":"^0.10.1","dashdash":"^1.5.0"},"repository":{"type":"git","url":"https://github.com/seldo/PNP.git"},"bugs":{"url":"https://github.com/seldo/PNP/issues"},"homepage":"https://github.com/seldo/PNP","keywords":["php","simple","basic","web","server","simplehttpserver"],"_id":"pnp@0.0.3","_shasum":"c2cb6981070427c5e22c7acfb5b56b0b2cfeb0ab","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"seldo","email":"laurie@npmjs.com"},"maintainers":[{"name":"seldo","email":"laurie@npmjs.com"}],"dist":{"shasum":"c2cb6981070427c5e22c7acfb5b56b0b2cfeb0ab","size":3201,"noattachment":false,"key":"/pnp/-/pnp-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/pnp/download/pnp-0.0.3.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-23T15:46:17.008Z","publish_time":1401564783360,"_cnpm_publish_time":1401564783360},"0.0.2":{"name":"pnp","version":"0.0.2","description":"A terrible idea, realized","main":"index.js","scripts":{"start":"node ./index.js","test":"echo \"Error: no test specified\" && exit 1"},"bin":{"pnp":"./cli.js"},"author":{"name":"Laurie Voss","email":"github@seldo.com"},"license":"ISC","dependencies":{"ejs":"^1.0.0","url":"^0.10.1","dashdash":"^1.5.0"},"repository":{"type":"git","url":"https://github.com/seldo/PNP.git"},"bugs":{"url":"https://github.com/seldo/PNP/issues"},"homepage":"https://github.com/seldo/PNP","keywords":["php","simple","basic","web","server","simplehttpserver"],"_id":"pnp@0.0.2","_shasum":"0d59a8c3641dfc2030ce03085a11f8cb59c826bc","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"seldo","email":"laurie@npmjs.com"},"maintainers":[{"name":"seldo","email":"laurie@npmjs.com"}],"dist":{"shasum":"0d59a8c3641dfc2030ce03085a11f8cb59c826bc","size":3149,"noattachment":false,"key":"/pnp/-/pnp-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pnp/download/pnp-0.0.2.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-23T15:46:16.151Z","publish_time":1401563283486,"_cnpm_publish_time":1401563283486},"0.0.1":{"name":"pnp","version":"0.0.1","description":"A terrible idea, realized","main":"index.js","scripts":{"start":"node ./index.js","test":"echo \"Error: no test specified\" && exit 1"},"bin":{"pnp":"./cli.js"},"author":{"name":"Laurie Voss","email":"github@seldo.com"},"license":"ISC","dependencies":{"ejs":"^1.0.0","url":"^0.10.1","dashdash":"^1.5.0"},"repository":{"type":"git","url":"https://github.com/seldo/PNP.git"},"bugs":{"url":"https://github.com/seldo/PNP/issues"},"homepage":"https://github.com/seldo/PNP","keywords":["php","simple","basic","web","server","simplehttpserver"],"_id":"pnp@0.0.1","dist":{"shasum":"05c2f5fa339726a5ece5d8dfb6c70fbe41bbd62e","size":3144,"noattachment":false,"key":"/pnp/-/pnp-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pnp/download/pnp-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"seldo","email":"laurie@npmjs.com"},"maintainers":[{"name":"seldo","email":"laurie@npmjs.com"}],"directories":{},"_cnpmcore_publish_time":"2021-12-23T15:46:15.260Z","publish_time":1399965157072,"_cnpm_publish_time":1399965157072}},"readme":"# PNP: Personal Node Pages\n\nDo you ever think \"man, node.js is great, but I wish I could just throw up a simple website \nfast like I could in PHP?\"\n\nWell, screw you, I built this anyway! PNP serves a website that consists of nothing but EJS \ntemplates and static files, from any folder you choose.\n\n**Update:** PNP is now [in production](http://silly.technology)!\n\n## Installation\n\nPNP is best used as a global utility:\n\n`npm install pnp -g`\n\n## Usage\n\nSwitch to the directory containing your templates, and just run:\n\n`pnp`\n\nYou're done! Your site is now available at [http://localhost:5000](http://localhost:5000).\n\nIf you want to get fancy, you can specify the host (or IP) and port:\n\n`pnp -p 8080 -h 192.168.0.101`\n\nBy default, PNP listens on all available IPs. This is convenient but insecure.\n\n## Making a site\n\nTo create a new page in your site, simply create a file ending in `.ejs` and put it in the\ndirectory where you are when you run PNP. You can create as many as you want, and it \nunderstands folders and sub-folders. Anything that doesn't end in `.ejs` (like CSS, or image\nfiles) gets served straight up without any modification.\n\n## Templates\n\nPNP uses [EJS](https://www.npmjs.org/package/ejs) to do all templating. EJS is basically\nJavaScript used the way PHP or ASP pages are: HTML, with code embedded in the HTML. Here's \nan example template:\n\n    <%\n    var fun = function() {\n      return \"woo\"\n    }\n    %>\n    <% title = 'Hello!' %>\n    <% include templates/header %>\n    \n    <h1>Welcome!</h1>\n    \n    <p>This is the home page. Here's <a href=\"/foo\">foo</a> and <a href=\"/foo/bar\">bar</a></p>\n    \n    <p>Also <a href=\"/baz\">baz</a> and <a href=\"woo\">woo</a>.</p>\n    \n    <p>The time is <%= new Date() %>.</p>\n    \n    <p>Is this <%= fun() %>?</p>\n    \n    <% include templates/footer %>\n\nYou can define and use functions, include other templates, and run arbitrary JavaScript in\nthe template. You can also make use of variables in query strings. These are made available\nin a variable called `_GET` (oh yeah, I'm bringing it back). So if your URL is \n[http://localhost/foo?x=y](http://localhost/foo?x=y) and you have a file called \"foo.ejs\"\nin your site, you can put the following code in it:\n\n    <p>The value of x is <%= _GET.x %></p>\n    \nAnd the page will print \"The value of x is y\". I will get around to POST variables at \nsome point I'm sure.","_attachments":{},"homepage":"https://github.com/seldo/PNP","bugs":{"url":"https://github.com/seldo/PNP/issues"},"license":"ISC"}