Skip to content
This repository
Browse code

Remove Windows newlines

  • Loading branch information...
commit 41b13a680601f4f85964821ca87ec4e8cba44324 1 parent 8181b3d
Eran Hammer authored
1  .gitignore
... ...
@@ -1,2 +1,3 @@
1 1
 config.js
2 2
 
  3
+.nide
1  .npmignore
... ...
@@ -0,0 +1 @@
  1
+.nide
46  LICENSE
... ...
@@ -1,24 +1,24 @@
1  
-Copyright (c) 2011, Yahoo, Inc.
2  
-All rights reserved.
3  
-
4  
-Redistribution and use in source and binary forms, with or without
5  
-modification, are permitted provided that the following conditions are met:
6  
-    * Redistributions of source code must retain the above copyright
7  
-      notice, this list of conditions and the following disclaimer.
8  
-    * Redistributions in binary form must reproduce the above copyright
9  
-      notice, this list of conditions and the following disclaimer in the
10  
-      documentation and/or other materials provided with the distribution.
11  
-    * Neither the name of Yahoo! Inc. nor the
12  
-      names of its contributors may be used to endorse or promote products
13  
-      derived from this software without specific prior written permission.
14  
-
15  
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16  
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  
-DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
19  
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  1
+Copyright (c) 2011, Yahoo, Inc.
  2
+All rights reserved.
  3
+
  4
+Redistribution and use in source and binary forms, with or without
  5
+modification, are permitted provided that the following conditions are met:
  6
+    * Redistributions of source code must retain the above copyright
  7
+      notice, this list of conditions and the following disclaimer.
  8
+    * Redistributions in binary form must reproduce the above copyright
  9
+      notice, this list of conditions and the following disclaimer in the
  10
+      documentation and/or other materials provided with the distribution.
  11
+    * Neither the name of Yahoo! Inc. nor the
  12
+      names of its contributors may be used to endorse or promote products
  13
+      derived from this software without specific prior written permission.
  14
+
  15
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  16
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  17
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  18
+DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
  19
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  20
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  21
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  22
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 24
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
186  Readme.md
Source Rendered
... ...
@@ -1,93 +1,93 @@
1  
-Postmile is a collaborative list making tool built using JS, Node.js, and MongoDB.
2  
-
3  
-# Installation
4  
-
5  
-Postmile consists of an api server and a web server, both running using Node.js. The two servers can run on the same machine or different machines.
6  
-The following is based on a shared machine.
7  
-
8  
-```bash
9  
-$ git clone git@github.com:hueniverse/postmile.git
10  
-$ cd postmile
11  
-$ cp config.js.example config.js
12  
-```
13  
-
14  
-Edit postmile/config.js with your preferences and configuration.
15  
-
16  
-```bash
17  
-$ cd api
18  
-$ cp vault.js.example vault.js
19  
-```
20  
-
21  
-Edit postmile/api/vault.js and set the values of the 'aes256Key' variables to different random secrets sufficiently long (e.g. 40 characters).
22  
-
23  
-If your MongoDB requires authentication, set the values of the database 'username' and 'password' (otherwise leave empty).
24  
-
25  
-```bash
26  
-$ npm update
27  
-$ node install
28  
-
29  
-110827/005720.948, info, Database initialized
30  
-110827/005720.952, info, Initial dataset created successfully
31  
-110827/005720.952, info, >>>>> postmile.web client secret: __some__secret__
32  
-```
33  
-
34  
-Copy the postmile.web client secret and save it for later.
35  
-
36  
-```bash
37  
-$ cd ../web
38  
-$ npm update
39  
-$ cp vault.js.example vault.js
40  
-```
41  
-
42  
-Edit postmile/web/vault.js and set the values of the 'aes256Key' variables to different random secrets sufficiently long (e.g. 40 characters).
43  
-
44  
-Set the value of the postmileAPI 'clientSecret' variable to the client secret saved earlier.
45  
-
46  
-Enter at least one third-party API credentials (Twitter, Facebook, or Yahoo!) as received from each provider when you registered the application.
47  
-If asked, the callback URI is your web server configuration entered above with the path '/auth/twitter', '/auth/facebook', or '/auth/yahoo'.
48  
-For example, if you configured your web server to run on '127.0.0.1', port '8000', using the 'http' scheme, and you are using Twitter, your
49  
-callback URI is http://127.0.0.1:8000/auth/twitter.
50  
-
51  
-```bash
52  
-$ cd ..
53  
-```
54  
-
55  
-Make sure to protect your vault.js files. If an attacker gets hold of them, you're screwed.
56  
-If you are going to run this in a production environment, you should use TLS (HTTPS) for the web server (otherwise it's cookies and OAuth 2.0 bits are
57  
-pretty open for attacks). To configure TLS, set the 'process.web.tls' variable in the postmile/config.js file to point to your TLS key and certificate.
58  
-
59  
-# Startup
60  
-
61  
-To start both servers at the same time in the same process (combined log output):
62  
-
63  
-```bash
64  
-$ node postmile
65  
-```
66  
-
67  
-To start each server individually:
68  
-
69  
-```bash
70  
-$ node api/index &
71  
-$ node web/index &
72  
-```
73  
-
74  
-Now point your browser at the web server address and start using Postmile.
75  
-
76  
-# Credits
77  
-
78  
-[Eran Hammer-Lahav](http://hueniverse.com) - Concept and server-side components
79  
-
80  
-[Lance Welsh](https://github.com/lpw) - 'view' web client
81  
-
82  
-Axel Albin-Lax, Josh Kamler, and Bryan Chen - UX/UI design, Snowy web client theme
83  
-
84  
-[Emmanuel Crouvisier](https://github.com/emcro) - 'view' web client CSS/HTML
85  
-
86  
-[Chris Carrasco](http://chriscarrasco.com/) - Original artwork
87  
-
88  
-# History
89  
-
90  
-Postmile is based on the discontinued experimental Yahoo! Sled project initially published at: https://github.com/yahoo/postmile.
91  
-
92  
-
93  
-
  1
+Postmile is a collaborative list making tool built using JS, Node.js, and MongoDB.
  2
+
  3
+# Installation
  4
+
  5
+Postmile consists of an api server and a web server, both running using Node.js. The two servers can run on the same machine or different machines.
  6
+The following is based on a shared machine.
  7
+
  8
+```bash
  9
+$ git clone git@github.com:hueniverse/postmile.git
  10
+$ cd postmile
  11
+$ cp config.js.example config.js
  12
+```
  13
+
  14
+Edit postmile/config.js with your preferences and configuration.
  15
+
  16
+```bash
  17
+$ cd api
  18
+$ cp vault.js.example vault.js
  19
+```
  20
+
  21
+Edit postmile/api/vault.js and set the values of the 'aes256Key' variables to different random secrets sufficiently long (e.g. 40 characters).
  22
+
  23
+If your MongoDB requires authentication, set the values of the database 'username' and 'password' (otherwise leave empty).
  24
+
  25
+```bash
  26
+$ npm update
  27
+$ node install
  28
+
  29
+110827/005720.948, info, Database initialized
  30
+110827/005720.952, info, Initial dataset created successfully
  31
+110827/005720.952, info, >>>>> postmile.web client secret: __some__secret__
  32
+```
  33
+
  34
+Copy the postmile.web client secret and save it for later.
  35
+
  36
+```bash
  37
+$ cd ../web
  38
+$ npm update
  39
+$ cp vault.js.example vault.js
  40
+```
  41
+
  42
+Edit postmile/web/vault.js and set the values of the 'aes256Key' variables to different random secrets sufficiently long (e.g. 40 characters).
  43
+
  44
+Set the value of the postmileAPI 'clientSecret' variable to the client secret saved earlier.
  45
+
  46
+Enter at least one third-party API credentials (Twitter, Facebook, or Yahoo!) as received from each provider when you registered the application.
  47
+If asked, the callback URI is your web server configuration entered above with the path '/auth/twitter', '/auth/facebook', or '/auth/yahoo'.
  48
+For example, if you configured your web server to run on '127.0.0.1', port '8000', using the 'http' scheme, and you are using Twitter, your
  49
+callback URI is http://127.0.0.1:8000/auth/twitter.
  50
+
  51
+```bash
  52
+$ cd ..
  53
+```
  54
+
  55
+Make sure to protect your vault.js files. If an attacker gets hold of them, you're screwed.
  56
+If you are going to run this in a production environment, you should use TLS (HTTPS) for the web server (otherwise it's cookies and OAuth 2.0 bits are
  57
+pretty open for attacks). To configure TLS, set the 'process.web.tls' variable in the postmile/config.js file to point to your TLS key and certificate.
  58
+
  59
+# Startup
  60
+
  61
+To start both servers at the same time in the same process (combined log output):
  62
+
  63
+```bash
  64
+$ node postmile
  65
+```
  66
+
  67
+To start each server individually:
  68
+
  69
+```bash
  70
+$ node api/index &
  71
+$ node web/index &
  72
+```
  73
+
  74
+Now point your browser at the web server address and start using Postmile.
  75
+
  76
+# Credits
  77
+
  78
+[Eran Hammer-Lahav](http://hueniverse.com) - Concept and server-side components
  79
+
  80
+[Lance Welsh](https://github.com/lpw) - 'view' web client
  81
+
  82
+Axel Albin-Lax, Josh Kamler, and Bryan Chen - UX/UI design, Snowy web client theme
  83
+
  84
+[Emmanuel Crouvisier](https://github.com/emcro) - 'view' web client CSS/HTML
  85
+
  86
+[Chris Carrasco](http://chriscarrasco.com/) - Original artwork
  87
+
  88
+# History
  89
+
  90
+Postmile is based on the discontinued experimental Yahoo! Sled project initially published at: https://github.com/yahoo/postmile.
  91
+
  92
+
  93
+
188  config.js.example
... ...
@@ -1,94 +1,94 @@
1  
-// Product Configuration
2  
-
3  
-exports.product = {
4  
-
5  
-    name: 'Postmile'
6  
-};
7  
-
8  
-
9  
-// Server Configuration
10  
-
11  
-exports.host = {
12  
-
13  
-    web: {
14  
-
15  
-        domain: 'localhost',
16  
-        port: 8000,
17  
-        scheme: 'http'
18  
-    },
19  
-
20  
-    api: {
21  
-
22  
-        domain: 'localhost',
23  
-        port: 8001,
24  
-        scheme: 'http'
25  
-    },
26  
-
27  
-    uri: function (type) {
28  
-
29  
-        var set = (type === 'web' ? exports.host.web : exports.host.api);
30  
-        return set.scheme + '://' + set.domain + (set.port ? ':' + set.port : '');
31  
-    },
32  
-
33  
-    authority: function (type) {
34  
-
35  
-        var set = (type === 'web' ? exports.host.web : exports.host.api);
36  
-        return set.domain + (set.port ? ':' + set.port : '');
37  
-    }
38  
-};
39  
-
40  
-
41  
-// Process Configuration
42  
-
43  
-exports.process = {
44  
-
45  
-    web: {
46  
-
47  
-        // runAs: 'www-data',
48  
-
49  
-        // tls: {
50  
-        //
51  
-        //     key: 'cert/postmile.net.key',
52  
-        //     cert: 'cert/postmile.net.crt'
53  
-        // }
54  
-    },
55  
-
56  
-    api: {
57  
-
58  
-        // runAs: 'www-data',
59  
-    }
60  
-};
61  
-
62  
-
63  
-// Database Configuration
64  
-
65  
-exports.database = {
66  
-
67  
-    host: '127.0.0.1',
68  
-    port: 27017,
69  
-    db: 'postmile'
70  
-};
71  
-
72  
-
73  
-// Email Configuration
74  
-
75  
-exports.email = {
76  
-
77  
-    fromName: 'Postmile',
78  
-    replyTo: 'no-reply@your.domain',
79  
-    admin: 'admin@your.domain',
80  
-    feedback: 'admin@your.domain',
81  
-
82  
-    server: {
83  
-
84  
-//      port: 25,
85  
-//      user: '',
86  
-//      password: '',
87  
-//      host: 'localhost',
88  
-//      ssl: false
89  
-    }
90  
-};
91  
-
92  
-
93  
-
94  
-
  1
+// Product Configuration
  2
+
  3
+exports.product = {
  4
+
  5
+    name: 'Postmile'
  6
+};
  7
+
  8
+
  9
+// Server Configuration
  10
+
  11
+exports.host = {
  12
+
  13
+    web: {
  14
+
  15
+        domain: 'localhost',
  16
+        port: 8000,
  17
+        scheme: 'http'
  18
+    },
  19
+
  20
+    api: {
  21
+
  22
+        domain: 'localhost',
  23
+        port: 8001,
  24
+        scheme: 'http'
  25
+    },
  26
+
  27
+    uri: function (type) {
  28
+
  29
+        var set = (type === 'web' ? exports.host.web : exports.host.api);
  30
+        return set.scheme + '://' + set.domain + (set.port ? ':' + set.port : '');
  31
+    },
  32
+
  33
+    authority: function (type) {
  34
+
  35
+        var set = (type === 'web' ? exports.host.web : exports.host.api);
  36
+        return set.domain + (set.port ? ':' + set.port : '');
  37
+    }
  38
+};
  39
+
  40
+
  41
+// Process Configuration
  42
+
  43
+exports.process = {
  44
+
  45
+    web: {
  46
+
  47
+        // runAs: 'www-data',
  48
+
  49
+        // tls: {
  50
+        //
  51
+        //     key: 'cert/postmile.net.key',
  52
+        //     cert: 'cert/postmile.net.crt'
  53
+        // }
  54
+    },
  55
+
  56
+    api: {
  57
+
  58
+        // runAs: 'www-data',
  59
+    }
  60
+};
  61
+
  62
+
  63
+// Database Configuration
  64
+
  65
+exports.database = {
  66
+
  67
+    host: '127.0.0.1',
  68
+    port: 27017,
  69
+    db: 'postmile'
  70
+};
  71
+
  72
+
  73
+// Email Configuration
  74
+
  75
+exports.email = {
  76
+
  77
+    fromName: 'Postmile',
  78
+    replyTo: 'no-reply@your.domain',
  79
+    admin: 'admin@your.domain',
  80
+    feedback: 'admin@your.domain',
  81
+
  82
+    server: {
  83
+
  84
+//      port: 25,
  85
+//      user: '',
  86
+//      password: '',
  87
+//      host: 'localhost',
  88
+//      ssl: false
  89
+    }
  90
+};
  91
+
  92
+
  93
+
  94
+
8  package.json
... ...
@@ -0,0 +1,8 @@
  1
+{
  2
+    "name": "postmile",
  3
+    "description": "",
  4
+    "version": "0.1.0",
  5
+    "author": "",
  6
+    "dependencies": {},
  7
+    "devDependencies": {}
  8
+}
20  postmile.js
... ...
@@ -1,10 +1,10 @@
1  
-// Start API Server
2  
-
3  
-require('./api/index');
4  
-
5  
-
6  
-// Start Web Server
7  
-
8  
-require('./web/index');
9  
-
10  
-
  1
+// Start API Server
  2
+
  3
+require('./api/index');
  4
+
  5
+
  6
+// Start Web Server
  7
+
  8
+require('./web/index');
  9
+
  10
+

0 notes on commit 41b13a6

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