diff --git a/app.js b/app.js index 818968e0fb..56b95a1cee 100644 --- a/app.js +++ b/app.js @@ -18,7 +18,7 @@ global.templates = {}; templates.init([ 'header', 'footer', 'logout', 'admin/header', 'admin/footer', 'admin/index', 'emails/reset', 'emails/reset_plaintext', 'emails/email_confirm', 'emails/email_confirm_plaintext', - 'emails/header.tpl', 'emails/footer.tpl' + 'emails/header', 'emails/footer', 'install/header', 'install/footer', 'install/basic' ]); templates.ready(function() { diff --git a/public/templates/config.json b/public/templates/config.json index 8a35b78e0b..04aa514a26 100644 --- a/public/templates/config.json +++ b/public/templates/config.json @@ -10,6 +10,8 @@ "admin/twitter[^]*": "admin/twitter", "admin/facebook[^]*": "admin/facebook", "admin/gplus[^]*": "admin/gplus", + "install/?$": "install/basic", + "install/basic/?$": "install/basic", "users[^]*edit": "accountedit", "users[^]*friends": "friends", "users/[^]*": "account", diff --git a/public/templates/install/basic.tpl b/public/templates/install/basic.tpl new file mode 100644 index 0000000000..9ab273509e --- /dev/null +++ b/public/templates/install/basic.tpl @@ -0,0 +1,28 @@ + +

Step 1 – Basic Information

+ +

+ Thanks for choosing to install NodeBB! We'll need some information to set up your installation + configuration... +

+ +

Path Information

+

+ Please enter the web-accessible url that will be used to point to the NodeBB installation. If you are using a port number in the address, + include it in the field below, not here + +

+ +

+ +

+ +
+ +
+ +

NodeBB Secret

+

+ This "secret" is used to encode user sessions, so they are not stored in plaintext. Enter a bunch of random characters below: +

+ \ No newline at end of file diff --git a/public/templates/install/footer.tpl b/public/templates/install/footer.tpl new file mode 100644 index 0000000000..9c25607790 --- /dev/null +++ b/public/templates/install/footer.tpl @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/public/templates/install/header.tpl b/public/templates/install/header.tpl new file mode 100644 index 0000000000..535efe3092 --- /dev/null +++ b/public/templates/install/header.tpl @@ -0,0 +1,45 @@ + + + + NodeBB + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/src/routes/install.js b/src/routes/install.js new file mode 100644 index 0000000000..e882aa954a --- /dev/null +++ b/src/routes/install.js @@ -0,0 +1,44 @@ + +var RDB = require('../redis.js'); + +(function(Install) { + Install.create_routes = function(app) { + + (function() { + var routes = ['basic']; + + for (var i=0, ii=routes.length; i