Skip to content

Commit 5039118

Browse files
committed
Configuration for versioning, when rebinding the host from dev-server to all interfaces
1 parent c831050 commit 5039118

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

frontend/encore/dev-server.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,19 @@ to bind to all IP addresses and allow any host to access the server:
3232

3333
.. code-block:: terminal
3434
35-
$ ./node_modules/.bin/encore dev-server --host 0.0.0.0 --disable-host-check
35+
$ ./node_modules/.bin/encore dev-server --public http://docker-host:9000 --port 9000 --host 0.0.0.0 --disable-host-check
3636
3737
You can now access the dev-server using the IP address to your virtual machine on
38-
port 8080 - e.g. http://192.168.1.1:8080.
38+
port 9000 - e.g. http://192.168.1.1:9000.
39+
If you've activated the :ref:`manifest.json versioning <load-manifest-files>` you need additional configuration to alter the url used in your templates to the ``dev-server``:
40+
41+
.. code-block:: javascript
42+
43+
Encore
44+
.setManifestKeyPrefix('build/')
45+
46+
When you're using the ``dev-server`` in a docker container, configure accordingly and bind the port from the ``dev-server`` (default 8080) onto a port on the host and provide this port --public parameter above.
47+
3948

4049
Hot Module Replacement HMR
4150
--------------------------

0 commit comments

Comments
 (0)