Skip to content

Commit 4a71997

Browse files
committed
Update README to use jwebserver instead of MAMP
Installing Apache httpd, MySQL and PHP seems a bit overkill to serve a static website. Suggest using jwebserver from JDK 19+ instead
1 parent 895c562 commit 4a71997

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,30 @@ The output can be found in the `build/dist` directory.
7474

7575
```bash
7676
./gradlew buildGuide --console=plain
77-
7877
```
7978
The output can be found in the `build/dist` directory.
8079

81-
## Running the website locally
80+
This will generate links to https://grails.apache.org if you want the links to point to your local webserver you need to
81+
set this environment variable before running the build commands (port number depend on webserver...):
82+
83+
```bash
84+
export GRAILS_WS_URL=http://127.0.0.1:8000
85+
```
8286

83-
The easiest way to work locally is to generate the site and setup your Webserver to serve build/dist.
87+
## Running the website locally
8488

89+
The easiest way to work locally is to generate the site and set up your Webserver to serve build/dist.
8590

86-
### Using MAMP
91+
### Using jwebserver
8792

88-
Go to [MAMP](https://www.mamp.info/en/mamp/) for installation instructions:
93+
JDK 19+ comes with a simpel webserver called [jwebserver](https://docs.oracle.com/en/java/javase/25/docs/specs/man/jwebserver.html) that can be used for serving static files:
8994

90-
![](docs/mamp.png)
95+
```bash
96+
$ jwebserver -d $(pwd)/build/dist
97+
Binding to loopback by default. For all interfaces use "-b 0.0.0.0" or "-b ::".
98+
Serving /home/user/grails-static-website/build/dist and subdirectories on 127.0.0.1 port 8000
99+
URL http://127.0.0.1:8000/
100+
```
91101

92102
### Using Python
93103

docs/mamp.png

-580 KB
Binary file not shown.

0 commit comments

Comments
 (0)