Set Up Local Frontend
Add a Theme to Your Project
To test your frontend locally, you need to have a Shopgate theme in your project. You can either create a theme or check out one of our ready-to-go themes from GitHub.
Using the Default Android Theme
$ cd themes $ git clone https://github.com/shopgate/theme-gmd.git $ cd theme-gmd $ npm i $ cd ../..
Set Up the Frontend Environment
sgconnect frontend setup to set up the local
frontend environment. For most cases, you can accept the
default values for all requested settings. For more
information, refer to the Platform SDK
You only need to run the setup step once for every project folder. Later you can omit it.
Start the Frontend Environment
sgconnect frontend startto start the frontend environment.
- Wait until the integrated Webpack process compiles your theme sources and starts the local development server.
- After the compile process finishes, you can access
the locally running application by opening the
development server URL in your browser:
You should see your application frontend.
Note: The port is set to 8080 by default. If you changed the port during setup, you need to use the new port to access the development server URL.