奋力拼搏

Run Your Web App via port 80 - Sails.js

The Error was to sails lift the App via only sails lift
Get many Times this error back, tried everything to lift the Web App. but Error. To fix this Issue, do you can change some files inside your App. After Run your App with $ sudo sails lift .

I have included a local.js file to the App. Here is my Code to Run the WebApp via port 80 without 1337 . The very Important thing is to take your port with this small code port: process.env.PORT || 80,

Now a was go ahead with the local.js like in the description in the sails.js document! first i have inculded this in the development.js file. and saved this.

info: To see your app, visit http://localhost
info: To shut down Sails, press <CTRL> + C at any time.

debug: --------------------------------------------------------
debug: :: Tue Oct 06 2015 22:18:40 GMT+0200 (CEST)

debug: Environment : development
debug: Port        : 80
debug: --------------------------------------------------------
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: listen EACCES
    at exports._errnoException (util.js:746:11)
    at Server._listen2 (net.js:1139:19)
    at listen (net.js:1182:10)

The development.js File!

/**
 * Development environment settings
 *
 * This file can include shared settings for a development team,
 * such as API keys or remote database passwords.  If you're using
 * a version control solution for your Sails app, this file will
 * be committed to your repository unless you add it to your .gitignore
 * file.  If your repository will be publicly viewable, don't add
 * any private information to this file!
 *
 */

module.exports = {

  /***************************************************************************
   * Set the default database connection for models in the development       *
   * environment (see config/connections.js and config/models.js )           *
   ***************************************************************************/

  // models: {
  //   connection: 'someMongodbServer'
  // },

  /***************************************************************************
   * Set the port in the development environment to 80                        *
   ***************************************************************************/

   // port: 80,
};


The development.js.bak File!

/**
 * Development environment settings
 *
 * This file can include shared settings for a development team,
 * such as API keys or remote database passwords.  If you're using
 * a version control solution for your Sails app, this file will
 * be committed to your repository unless you add it to your .gitignore
 * file.  If your repository will be publicly viewable, don't add
 * any private information to this file!
 *
 */

module.exports = {

  /***************************************************************************
   * Set the default database connection for models in the development       *
   * environment (see config/connections.js and config/models.js )           *
   ***************************************************************************/

  // models: {
  //   connection: 'someMongodbServer'
  // },

  /***************************************************************************
   * Set the port in the development environment to 80                        *
   ***************************************************************************/

   port: 80,
};

The local.js File!

/**

Local environment settings *
While you're developing your app, this config file should include
any settings specifically for your development computer (db passwords, etc.)
When you're ready to deploy your app in production, you can use this file
for configuration options on the server where it will be deployed. * *
PLEASE NOTE:
This file is included in your .gitignore, so if you're using git
as a version control solution for your Sails app, keep in mind that
this file won't be committed to your repository! *
Good news is, that means you can specify configuration for your local
machine in this file without inadvertently committing personal information
(like database passwords) to the repo. Plus, this prevents other members
of your team from commiting their local configuration changes on top of yours. * *
For more information, check out:
http://sailsjs.org/#documentation */
module.exports = {

// The port setting determines which TCP port your app will be deployed on
// Ports are a transport-layer concept designed to allow many different
// networking applications run at the same time on a single computer.
// More about ports: http://en.wikipedia.org/wiki/Port_(computer_networking)
//
// By default, if it's set, Sails uses the PORT environment variable.
// Otherwise it falls back to port 1337.
//
// In production, you'll probably want to change this setting
// to 80 (http://) or 443 (https://) if you have an SSL certificate

port: process.env.PORT || 80,

// The runtime "environment" of your Sails app is either 'development' or 'production'.
//
// In development, your Sails app will go out of its way to help you
// (for instance you will receive more descriptive error and debugging output)
//
// In production, Sails configures itself (and its dependencies) to optimize performance.
// You should always put your app in production mode before you deploy it to a server-
// This helps ensure that your Sails app remains stable, performant, and scalable.
//
// By default, Sails sets its environment using the NODE_ENV environment variable.
// If NODE_ENV is not set, Sails will run in the 'development' environment.

 //environment: process.env.NODE_ENV || 'development'

};

Pingo The WebApp is running now on localhost

Space-O-Mac-Pro:xxxxxx cybo$ sudo sails lift
Password:

info: Starting app...

info:
info:                .-..-.
info:
info:    Sails              <|    .-..-.
info:    v0.11.0             |\
info:                       /|.\
info:                      / || \
info:                    ,'  |'  \
info:                 .-'.-==|/_--'
info:                 `--'-------'
info:    __---___--___---___--___---___--___
info:  ____---___--___---___--___---___--___-__
info:
info: Server lifted in `/Users/cybo/Downloads/xxxxxxx`
info: To see your app, visit http://localhost
info: To shut down Sails, press <CTRL> + C at any time.

debug: --------------------------------------------------------
debug: :: Tue Oct 06 2015 22:24:03 GMT+0200 (CEST)

debug: Environment : development
debug: Port        : 80
debug: --------------------------------------------------------

PerfectWork: With Carbon based Lifeforms - Interloper!

Link: local.js Link: superuser Link: sails issues Link: Stack Overflow

“If you are going to walk on thin ice, you might as well dance”