In addition to deploying to NetSuite, you can also run SuiteCommerce Advanced on a local server to quickly test changes you make to the application. The local server is installed as part of the Node.js installation and uses the Express web framework. When you enter the
gulp local command, the server starts automatically.
The local server is primarily used to test frontend changes. When accessing the SuiteCommerce Advanced application on the local server, backend services used by the application are run on NetSuite. Therefore, any local changes you make to services or backend models must be deployed to NetSuite before they are accessible to the local server. Also, you must deploy any changes to services or backend models to NetSuite in order for them to work on the local server.
If you modify the distro.json file to add additional files or modules, you must restart your local server to see changes.
To deploy to the local server:
Go to your command line or terminal window.
Access the SuiteCommerce Advanced source directory containing the package.json file.
If implementing 2019.2 or later, this directory is the *_Live directory within your root source directory. For example: SC_19.2_Live/.
If implementing 2019.1 or earlier, this directory is the top-level root directory.
Enter the following command:
If this is the first time you are running
gulp local in this directory, this command creates a local distribution directory.
Navigate to the local version of the application using one of the following URLs:
My Account: http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/SSP_APPLICATION/my_account-local.ssp
In the above URL patterns, you must replace the following variables with values for your specific environment:
DOMAIN_NAME — replace this value with the domain name configured for your NetSuite website record.
ACCOUNT_ID — replace this value with your NetSuite account ID.
SSP_APPLICATION — replace this value with the URL root that you are accessing.
The URLs you use should be similar to the following examples:
When the local server is running, Gulp.js automatically compiles the application when you save any changes. You can refresh your browser to see the changes.