Merge pull request #280 from thelounge/min-node-ver

Document supported node version
This commit is contained in:
Jérémie Astori 2016-04-27 10:03:43 -04:00
commit 177041c9bb
4 changed files with 24 additions and 7 deletions

View File

@ -1,8 +1,9 @@
language: node_js language: node_js
node_js: node_js:
- '5.6' - '6'
- '4.3' - '5'
- '0.12' - '4'
- '4.2.0'
notifications: notifications:
email: email:
on_success: never on_success: never
@ -14,6 +15,6 @@ deploy:
api_key: api_key:
secure: I9iN31GWI+Mz0xPw81N7qh1M6uidB+3BmiPUXt8QigX45zwp9EhvfZ0U/AIdUyQwzK2RK1zLRQSt+2/1jyeVi+U+AAsRRmaAUx8iqKaQPAkPnQtElolgRP04WSgo7fvNejfM7zS939bQNKG3RlSm04yPgu+ke2igf799p2bpFe2LtyoEeIiUfrUkBiMSpMguN9XF8a7jqCyIouTKjXHR24RmzJ9r7ZoMV27yQauS7XlD81bontzNRZxTytDKdJpZ+sxGIT9mbbtM4LUFX8MeNe3p/bjWavEhrO0ZIpkbOfS/L/w1375YDoNPXxCs288lnGUH+NbGNAEfn+BTz8cmUp7jI7QWR/kNACPeopdAX4OdZxT8wfQcfQZrfCuSpKciOMC7vGgPpQqjQ61t1RKcKs9VUnwC0SwWjyo8LlzkFKnP1ks0eDGYsSoPLdpC9+76UmePkQdxMhscO8TOgkOCcsTMLiyt6ABGOGKu2iE5SsjUYtPiSiRzSBAQENoO560+xBSVTKwqvvhzUAIt4AuAQSgsFjAylDdyzKoObHX12hBdALrqSOOSVwwIQ5/jTgNAsilURHo7KPD407PhRnLOsvumL0qg4sr9S1hjuUKnNla5dg9GY8FVjJ+b2t0A2vgfG1pR1e3vrJRXrpkfRorhmjvKAk2o5you5pQ1Itty7rM= secure: I9iN31GWI+Mz0xPw81N7qh1M6uidB+3BmiPUXt8QigX45zwp9EhvfZ0U/AIdUyQwzK2RK1zLRQSt+2/1jyeVi+U+AAsRRmaAUx8iqKaQPAkPnQtElolgRP04WSgo7fvNejfM7zS939bQNKG3RlSm04yPgu+ke2igf799p2bpFe2LtyoEeIiUfrUkBiMSpMguN9XF8a7jqCyIouTKjXHR24RmzJ9r7ZoMV27yQauS7XlD81bontzNRZxTytDKdJpZ+sxGIT9mbbtM4LUFX8MeNe3p/bjWavEhrO0ZIpkbOfS/L/w1375YDoNPXxCs288lnGUH+NbGNAEfn+BTz8cmUp7jI7QWR/kNACPeopdAX4OdZxT8wfQcfQZrfCuSpKciOMC7vGgPpQqjQ61t1RKcKs9VUnwC0SwWjyo8LlzkFKnP1ks0eDGYsSoPLdpC9+76UmePkQdxMhscO8TOgkOCcsTMLiyt6ABGOGKu2iE5SsjUYtPiSiRzSBAQENoO560+xBSVTKwqvvhzUAIt4AuAQSgsFjAylDdyzKoObHX12hBdALrqSOOSVwwIQ5/jTgNAsilURHo7KPD407PhRnLOsvumL0qg4sr9S1hjuUKnNla5dg9GY8FVjJ+b2t0A2vgfG1pR1e3vrJRXrpkfRorhmjvKAk2o5you5pQ1Itty7rM=
on: on:
node: '5.6' node: '4'
tags: true tags: true
repo: thelounge/lounge repo: thelounge/lounge

View File

@ -35,6 +35,12 @@ the review process quicker and more streamlined.
## Install ## Install
To use The Lounge you must have [Node.js](https://nodejs.org/en/download/) installed.
The oldest Node.js version we support is 4.2.0.
If you still use 0.10 or 0.12 we strongly advise you to upgrade before installing The Lounge.
For more information on how to upgrade, read the [documentation](https://nodejs.org/en/download/package-manager/).
``` ```
sudo npm install -g thelounge sudo npm install -g thelounge
``` ```

View File

@ -26,6 +26,9 @@
"server" "server"
], ],
"license": "MIT", "license": "MIT",
"engines": {
"node": ">=4.2.0"
},
"dependencies": { "dependencies": {
"bcrypt-nodejs": "0.0.3", "bcrypt-nodejs": "0.0.3",
"cheerio": "0.20.0", "cheerio": "0.20.0",
@ -39,6 +42,7 @@
"moment": "2.13.0", "moment": "2.13.0",
"read": "1.0.7", "read": "1.0.7",
"request": "2.72.0", "request": "2.72.0",
"semver": "5.1.0",
"socket.io": "1.4.5", "socket.io": "1.4.5",
"spdy": "3.3.2" "spdy": "3.3.2"
}, },

View File

@ -1,4 +1,5 @@
var _ = require("lodash"); var _ = require("lodash");
var package = require("../package.json");
var bcrypt = require("bcrypt-nodejs"); var bcrypt = require("bcrypt-nodejs");
var Client = require("./client"); var Client = require("./client");
var ClientManager = require("./clientManager"); var ClientManager = require("./clientManager");
@ -56,8 +57,13 @@ module.exports = function(options) {
manager.sockets = sockets; manager.sockets = sockets;
log.info("The Lounge is now running on", protocol + "://" + config.host + ":" + config.port + "/"); log.info("The Lounge v" + package.version + " is now running on", protocol + "://" + config.host + ":" + config.port + "/");
log.info("Press ctrl-c to stop"); log.info("Press ctrl-c to stop\n");
if (!require("semver").satisfies(process.version, package.engines.node)) {
log.warn("The oldest supported Node.js version is ", package.engines.node);
log.warn("We strongly encourage you to upgrade, see https://nodejs.org/en/download/package-manager/ for more details\n");
}
if (!config.public) { if (!config.public) {
manager.loadUsers(); manager.loadUsers();
@ -71,7 +77,7 @@ function index(req, res, next) {
if (req.url.split("?")[0] !== "/") return next(); if (req.url.split("?")[0] !== "/") return next();
return fs.readFile("client/index.html", "utf-8", function(err, file) { return fs.readFile("client/index.html", "utf-8", function(err, file) {
var data = _.merge( var data = _.merge(
require("../package.json"), package,
config config
); );
var template = _.template(file); var template = _.template(file);