Menu
Getting Started with AWS
Deploying a Web Application

Step 4: Change the App Configuration

Our web app uses an environment variable, theme, to control the CSS that is applied. The server.js file contains the following statement to make this environment variable available to the app:

Copy
app.locals.theme = process.env.THEME;

Changing the setting of this environment variable changes the look of the app. For more information, see public/static/bootstrap/css/theme and views/layout.jade in the code for the app.

The easiest way to update this environment variable is to use Elastic Beanstalk to update the configuration for your environment.

To change the app theme using Elastic Beanstalk

  1. Open the Elastic Beanstalk console.

  2. In the navigation pane for your environment, choose Configuration and open Software Configuration.

  3. Under Environment Properties, locate the THEME environment variable. Change the value from the default (flatly) to one of the following values, and then choose Save.

    • amelia

    • default

    • slate

    • united

  4. After Elastic Beanstalk finishes updating the environment, choose the URL for the app. The app has a new look.