Skip to content
Browse files

0.3.0; docs for the new scripts field

  • Loading branch information...
1 parent abb7673 commit 31a9d4e7e6f6990f4ee8ca31e7073afd6fd95ea5 @substack committed
Showing with 29 additions and 1 deletion.
  1. +1 −1 package.json
  2. +28 −0 readme.markdown
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "ploy",
- "version": "0.2.2",
+ "version": "0.3.0",
"description": "git push deploy http router, hosting branches on subdomains",
"bin": {
"ploy": "bin/cmd.js"
View
28 readme.markdown
@@ -98,6 +98,34 @@ OPTIONS
```
+# scripts
+
+ploy will look at your `package.json`'s `scripts.start` field for how to start
+processes.
+
+If `scripts.start` is a string, ploy will set `$PORT` for a single process and
+host it accordinly.
+
+If `scripts.start` is an object, the keys should map subdomains to commands to
+launch servers with. For instance:
+
+``` json
+{
+ "scripts": {
+ "start": {
+ "beep": "node beep.js",
+ "boop": "node boop.js",
+ "index": "node server.js"
+ }
+ }
+}
+```
+
+Will host `beep.js` at `beep.domain`, `boop.js` at `boop.domain` and `server.js`
+at just `domain`.
+
+Use the special key `"index"` to set a host to resolve for the root subdomain.
+
# methods
``` js

0 comments on commit 31a9d4e

Please sign in to comment.
Something went wrong with that request. Please try again.