Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,18 @@ docker pull ghcr.io/ithsjava25/project-webserver-juv25d:latest
## Step 3 – Run the container

```bash
docker run -p 3000:3000 ghcr.io/ithsjava25/project-webserver-juv25d:latest
docker run -p 8080:8080 ghcr.io/ithsjava25/project-webserver-juv25d:latest
```

---

## Step 4 – Open in browser

```
http://localhost:3000
http://localhost:8080
```
Comment thread
fmazmz marked this conversation as resolved.

The server runs on port **3000**.
The server runs on port **8080**.

---

Expand All @@ -160,10 +160,10 @@ org.juv25d.App
3. Open:

```
http://localhost:3000
http://localhost:8080
```
Comment thread
fmazmz marked this conversation as resolved.

Note: Running the packaged JAR directly with `java -jar` is not supported, as the project is not built as a fat JAR (external dependencies such as SnakeYAML are not bundled).
Note: The project is packaged as a fat JAR using the Maven Shade Plugin, so you can run it with `java -jar target/app.jar`.

---

Expand Down Expand Up @@ -327,7 +327,7 @@ Example:

```yaml
server:
port: 3000
port: 8080
root-dir: static

logging:
Expand Down
38 changes: 24 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.juv25d</groupId>
<artifactId>JavaHttpServer</artifactId>
<version>1.0.0-beta</version>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.release>25</maven.compiler.release>
Expand Down Expand Up @@ -58,19 +58,6 @@
<artifactId>maven-install-plugin</artifactId>
<version>3.1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>org.juv25d.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down Expand Up @@ -171,6 +158,29 @@
</targetTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>app</finalName>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.juv25d.App</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
1 change: 1 addition & 0 deletions src/main/java/org/juv25d/plugin/StaticFilesPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ public void handle(HttpRequest request, HttpResponse response) throws IOExceptio
response.setBody(staticResponse.body());
}
}

Loading