Skip to content

Commit cedefde

Browse files
authored
Fix README + Render.com (#16)
1 parent 18e335c commit cedefde

File tree

2 files changed

+59
-6
lines changed

2 files changed

+59
-6
lines changed

README.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
Embeddable Java Web Framework
22
==============================
33

4-
[![Sonatype Central](https://maven-badges.sml.io/sonatype-central/io.github.tanin47/embeddable-java-web-framework/badge.png?8cb1875)](https://central.sonatype.com/artifact/io.github.tanin47/embeddable-java-web-framework)
4+
[![Sonatype Central](https://maven-badges.sml.io/sonatype-central/io.github.tanin47/embeddable-java-web-framework/badge.svg)](https://central.sonatype.com/artifact/io.github.tanin47/embeddable-java-web-framework)
5+
![Github Actions](https://github.com/tanin47/embeddable-java-web-framework/actions/workflows/ci.yml/badge.svg?branch=main)
6+
[![codecov](https://codecov.io/gh/tanin47/embeddable-java-web-framework/graph/badge.svg?token=BGQU70MAUP)](https://codecov.io/gh/tanin47/embeddable-java-web-framework)
7+
58

69
Embeddable Java Web Framework (EJWF) is a Java project template for building a website with a tiny footprint.
710
It is suitable for <ins>a sidecar-style website embeddable on a larger JVM system</ins> and a standalone lightweight website.
@@ -18,7 +21,7 @@ The main selling point of EJWF is that it comes with productive and useful conve
1821
In contrast, most of the lightweight web frameworks focus on being a bare metal web server serving HTML and JSON.
1922
They don't provide support for any frontend framework like React or Svelte; you would have to do it yourself. This is exactly what EJWF provides.
2023

21-
Initially, EJWF was built as a foundation for [embeddable-java-web-framework](https://github.com/tanin47/embeddable-java-web-framework), a self-hosted database querying and editing tool, where
24+
Initially, EJWF was built as a foundation for [Backdoor](https://github.com/tanin47/backdoor), a self-hosted database querying and editing tool, where
2225
you can embed it into your larger application like SpringBoot or PlayFramework.
2326

2427
How to develop
@@ -73,8 +76,46 @@ Release a new version
7376
4. Go to Actions and trigger the workflow `publish-jar` on the tag `vX.Y.Z` in order to publish the JAR to Central
7477
Sonatype.
7578

76-
Embed your website into a larger system
77-
----------------------------------------
79+
How to run
80+
------------
81+
82+
There are 2 ways to run EWJF:
83+
84+
1. Run as a standalone: JAR, Docker, and Render.com
85+
2. Embed your website into a larger system
86+
87+
### 1. Run as a standalone
88+
89+
__<ins>Run from the JAR file</ins>__
90+
91+
First, you can download the `embeddable-java-web-framework-VERSION.jar` file from
92+
the [Releases](https://github.com/tanin47/embeddable-java-web-framework/releases) page.
93+
94+
Then, you can run the command below:
95+
96+
```
97+
java -jar embeddable-java-web-framework-1.0.0-rc1.jar
98+
```
99+
100+
Then, you can visit http://localhost:9090
101+
102+
__<ins>Use Docker</ins>__
103+
104+
The docker image is here: https://hub.docker.com/repository/docker/tanin47/embeddable-java-web-framework
105+
106+
```
107+
docker run -p 9090:9090 \
108+
--entrypoint "" \
109+
--pull always \
110+
tanin47/embeddable-java-web-framework:v1.0.0-rc1 \
111+
java -jar embeddable-java-web-framework-1.0.0-rc1.jar
112+
```
113+
114+
__<ins>Use Render.com</ins>__
115+
116+
The file [render.yaml](./render.yaml) shows a blueprint example of how to run EWJF on Render.
117+
118+
### 2. Embed your website into a larger system
78119

79120
After you've built your application on top of this framework and publish your fat jar,
80121
your customer can follow the below steps in order to embed your website into their applications.
@@ -85,11 +126,10 @@ your customer can follow the below steps in order to embed your website into the
85126
<dependency>
86127
<groupId>io.github.tanin47</groupId>
87128
<artifactId>embeddable-java-web-framework</artifactId>
88-
<version>0.1.1</version>
129+
<version>1.0.0-rc1</version>
89130
</dependency>
90131
```
91132

92-
93133
2. Instantiate the website with the port 9090 when the larger system initializes:
94134

95135
```java

render.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
services:
2+
- type: web
3+
name: embeddable-java-web-framework
4+
plan: free
5+
runtime: image
6+
image:
7+
url: docker.io/tanin47/embeddable-java-web-framework:v1.0.0-rc1
8+
dockerCommand: java -jar embeddable-java-web-framework:v1.0.0-rc1.jar
9+
healthCheckPath: /healthcheck
10+
envVars:
11+
- key: PORT
12+
value: 9090
13+
autoDeploy: true

0 commit comments

Comments
 (0)