1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-24 07:39:44 +02:00

Code formatting with prettier, change eslint config for the server

This commit is contained in:
Maksim Eltyshev 2019-11-05 18:01:42 +05:00
parent b7f37f0f96
commit a11f6260c0
191 changed files with 4321 additions and 2880 deletions

View file

@ -28,25 +28,29 @@ require('dotenv').config();
process.chdir(__dirname);
// Attempt to import `sails` dependency, as well as `rc` (for loading `.sailsrc` files).
var sails;
var rc;
let sails;
let rc;
try {
sails = require('sails');
rc = require('sails/accessible/rc');
} catch (err) {
console.error('Encountered an error when attempting to require(\'sails\'):');
console.error(err.stack);
sails = require('sails'); // eslint-disable-line global-require
rc = require('sails/accessible/rc'); // eslint-disable-line global-require
} catch (error) {
/* eslint-disable no-console */
console.error("Encountered an error when attempting to require('sails'):");
console.error(error.stack);
console.error('--');
console.error('To run an app using `node app.js`, you need to have Sails installed');
console.error('locally (`./node_modules/sails`). To do that, just make sure you\'re');
console.error("locally (`./node_modules/sails`). To do that, just make sure you're");
console.error('in the same directory as your app and run `npm install`.');
console.error();
console.error('If Sails is installed globally (i.e. `npm install -g sails`) you can');
console.error('also run this app with `sails lift`. Running with `sails lift` will');
console.error('not run this file (`app.js`), but it will do exactly the same thing.');
console.error('(It even uses your app directory\'s local Sails install, if possible.)');
return;
}//-•
console.error("(It even uses your app directory's local Sails install, if possible.)");
/* eslint-enable no-console */
process.exit(1);
}
// Start server
sails.lift(rc('sails'));