2016-05-11 9 views
0

Dies könnte eine sehr neue Frage sein, aber ich kann nicht scheinen, meine Sails.js App im Produktionsmodus arbeiten zu bekommen. Ich starte es im Produktionsmodus, indem ich NODE_ENV = Produktion einstelle und es sagt, dass es erfolgreich auf localhost gehoben wurde: 1337, aber wenn ich versuche, zum Link zu gehen, es gerade Zeit ohne Antwort vom Server.SailsJS Produktionsmodus reagiert nicht auf localhost: 1337

Die App Sails.js funktioniert im Entwicklungsmodus.

Durch die ganze Dokumentation gegangen und kann nicht sehen, was fehlt.

Ich habe eine configuration-Datei production.js.

- production.js (Endpunkte anonymisierten) ---

/** 
* Production environment settings 
* 
* This file can include shared settings for a production environment, 
* 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 = { 

    minicabit: { 
    api: { 
     host: "https://api-endpoint", 
     prepend: "/vX/", 
     key: "wrwerwrwrwewre" 
    } 
    }, 
    log: { 
    level: 'info' 
    }, 
    csrf: true, 

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

    models: { 
    connection: 'connMysql' 
    }, 


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

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

    //port: 80, 

    /*************************************************************************** 
    * Set the log level in production environment to "silent"     * 
    ***************************************************************************/ 

    // log: { 
    // level: "silent" 
    // } 

    blueprints: { 
    rest: false, 
    shortcuts: false 
    }, 

    session: { 

    /*************************************************************************** 
    *                   * 
    * In production, uncomment the following lines to set up a shared redis * 
    * session store that can be shared across multiple Sails.js servers  * 
    ***************************************************************************/ 

    adapter: 'connect-redis', 

    /*************************************************************************** 
    *                   * 
    * The following values are optional, if no options are set a redis   * 
    * instance running on localhost is expected. Read more about options at: * 
    * https://github.com/visionmedia/connect-redis        * 
    *                   * 
    *                   * 
    ***************************************************************************/ 

    host: 'redis-endpoint', 
    port: 6379, 
    ttl: 3600 
    // db: 0, 
    // pass: <redis auth password>, 
    // prefix: 'sess:' 
    } 
}; 

Fehle ich etwas anderes?

Dank

+0

Es gibt nicht genug Informationen hier, um eine Vermutung zu machen . Können Sie den Inhalt Ihrer 'production.js' Datei posten? – sgress454

+0

hinzugefügt production.js –

Antwort

Verwandte Themen