Test SuiteCommerce Advanced Customizations on Local Server

Run SuiteCommerce Advanced on a local server for quick testing of customizations. Utilize Gulp.js for live changes and frontend development.

·3 min read·View Oracle Docs

Starting SuiteCommerce Advanced (SCA) customizations on a local server allows developers to test changes efficiently and see results immediately. The local server setup is installed alongside Node.js and utilizes the Express web framework for serving files.

How to Start the Local Server

To initiate the local server, run the gulp local command from your command line. This will kick off Gulp.js, which initializes watch tasks that monitor file changes in specific directories like JavaScript, Templates, or Sass. When you save changes in these files, Gulp recompiles the materials automatically, updating the local distribution directory and notifying you through console messages.

Backend Services Interaction

It's important to note that the local server is mainly for testing frontend changes. Although the frontend operates locally, the backend services still run on NetSuite. Consequently, any modifications made to backend services need to be deployed to NetSuite before they can be tested on the local server.

Deploying to the Local Server

Follow these steps to deploy your changes:

  1. Open your terminal and access the SCA source directory containing the package.json file. The location varies by your SCA implementation version:

    • 2020.1 release and later: Navigate to the SC_xxx directory within your root source directory (e.g., SC_20.1).
    • 2019.2 release: Access the *_Live directory (e.g., SC_19.2_Live/).
    • 2019.1 or earlier: Use the top-level root directory.
  2. Run the command:

    bash
    gulp local

    This command will create a local distribution directory if it’s your first time running it in this directory.

  3. Access your local application using URLs like:

    • Shopping: http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/<SSP_APPLICATION>/shopping-local.ssp
    • My Account: http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/<SSP_APPLICATION>/my_account-local.ssp
    • Checkout: http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/<SSP_APPLICATION>/checkout-local.ssp

    Replace <DOMAIN_NAME>, <ACCOUNT_ID>, and <SSP_APPLICATION> with your specific environment details.

Important Notes

If you modify the distro.json file to add new files or modules, restart your local server to apply the changes.

When working with secure connections (HTTPS), additional setups are required, including generating SSL certificates and setting environment variables for secure testing. Refer to the related documentation for guidance on setting up secure environments.

Key Considerations

  • Frontend Focus: The local server primarily focuses on frontend changes, while backend services must be deployed separately.
  • Watch Tasks: Gulp.js effectively updates your changes in real-time, enhancing development productivity.
  • Secure Testing: If leveraging HTTPS methods, ensure you follow proper SSL configurations for local testing.

Key Takeaways

  • Running SuiteCommerce Advanced on a local server facilitates quick testing of frontend customizations.
  • The use of Gulp.js streamlines the update process as changes are made.
  • Proper deployment to NetSuite is necessary for backend service modifications to be functional locally.
  • Reload your application in the browser to see changes after saving files.
  • Secure HTTPS testing requires additional configurations for SSL certificates.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

How do I initiate the local server for SuiteCommerce Advanced?
To start the local server for SuiteCommerce Advanced, navigate to your SCA source directory and use the command line to run `gulp local`. This command will initiate Gulp.js and start monitoring specific directories for file changes.
Do changes to backend services require deployment to be tested locally?
Yes, changes to backend services must be deployed to NetSuite before they can be tested on the local server, as the local setup is primarily for testing frontend changes.
What modifications require restarting the local server?
If you modify the `distro.json` file to add new files or modules, you need to restart your local server for the changes to take effect.
Are there any special requirements for HTTPS testing on the local server?
Yes, for HTTPS testing on the local server, you need to generate SSL certificates and set appropriate environment variables to ensure secure connections.
Source: Test SCA Customizations on a Local Server Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →