Skip to content

Commit be22564

Browse files
author
synapticloop
committed
added in documentr
1 parent d289fbe commit be22564

File tree

3 files changed

+326
-45
lines changed

3 files changed

+326
-45
lines changed

README.md

Lines changed: 262 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,64 @@
1-
# RouteMaster
1+
<a name="#documentr_top"></a>
22

3-
Handy routing controller for the truly excellent [nanohttpd](https://github.com/NanoHttpd/nanohttpd) tiny, easily embeddable HTTP Java server.
3+
> **This project requires JVM version of at least 1.7**
44
55

6-
![routemaster home page](https://raw.github.com/synapticloop/routemaster/master/src/main/wiki/images/nano-httpd-home.png)
76

8-
# Now with Templar templating!
97

10-
Yes, you can now do some server side includes, using the synapticloop templar templating language!
118

12-
## How do I run RouteMaster?
139

14-
The quickest way is to grab a release from the [releases](https://github.com/synapticloop/routemaster/releases) page.
10+
<a name="documentr_heading_0"></a>
1511

16-
### Which release?
12+
# routemaster <sup><sup>[top](documentr_top)</sup></sup>
1713

18-
- `routemaster-example.zip`
19-
- `routemaster-templar.jar`
20-
- `routemaster.jar`
2114

22-
The `routemaster-example.zip` contains `routemaster-templar.jar` with the files served from the file system with the example site.
2315

24-
Unzip the folder, change to the `routemaster` directory - and run
16+
> lightweight web server with RESTful routing
2517
26-
```
27-
java -jar routemaster-templar.jar
28-
```
2918

30-
point a browser at [http://localhost:5474](http://localhost:5474)
31-
and away you go.
3219

33-
All of the files are server from the directory in which you started the server.
3420

35-
`routemaster-templar.jar`
3621

37-
This is the routemaster jar file with templar templating engine bundeled in with it.
3822

39-
- `routemaster.jar`
23+
<a name="documentr_heading_1"></a>
4024

41-
This is the plain routemaster jar file without nay other dependencies.
25+
# Table of Contents <sup><sup>[top](documentr_top)</sup></sup>
4226

43-
## How do I build RouteMaster?
4427

45-
you will need the following:
4628

47-
+ java (6 or higher)
48-
+ ant
29+
- [routemaster](#documentr_heading_0)
30+
- [Table of Contents](#documentr_heading_1)
31+
- [Now with Templar templating!](#documentr_heading_2)
32+
- [Options](#documentr_heading_3)
33+
- [As an aside](#documentr_heading_4)
4934

50-
then run
5135

52-
```
53-
ant -f build-ant-github.xml
54-
ant dist
55-
```
36+
# RouteMaster
5637

57-
which will download all of the nanohttpd components and build the RouteMaster, and place it in the dist directory.
38+
Handy routing controller for the truly excellent [nanohttpd](https://github.com/NanoHttpd/nanohttpd) tiny, easily embeddable HTTP Java server.
5839

59-
You will need to create a ```routemaster.properties``` file which is required to be either
40+
See [https://synapticloop.github.io/routemaster/](https://synapticloop.github.io/routemaster/) for full documentation
6041

61-
+ in the root of your classpath (e.g. src/main/java).
42+
![routemaster home page](https://raw.github.com/synapticloop/routemaster/master/src/main/wiki/images/nano-httpd-home.png)
6243

63-
or
6444

65-
+ in the same directory from whence the programme was launched
6645

67-
See ```routemaster.properties``` file for more information.
46+
<a name="documentr_heading_2"></a>
6847

69-
You will also need to have a mimetypes.properties file which is also required to be either
48+
# Now with Templar templating! <sup><sup>[top](documentr_top)</sup></sup>
7049

71-
+ in the root of your classpath (e.g. src/main/java).
50+
Yes, you can now do some server side includes, using the synapticloop templar templating language!
7251

73-
or
7452

75-
+ in the same directory from whence the programme was launched
7653

77-
This will allow you to over-ride the mimetypes that are served up.
54+
<a name="documentr_heading_3"></a>
7855

79-
## Options
56+
## Options <sup><sup>[top](documentr_top)</sup></sup>
8057

8158
Following the NanoHTTPD, you may pass in the following options
8259

60+
61+
8362
```
8463
- h
8564
--host The host to bind to - default 127.0.0.1
@@ -92,8 +71,246 @@ Following the NanoHTTPD, you may pass in the following options
9271
9372
```
9473

95-
## As an aside
74+
75+
76+
77+
78+
<a name="documentr_heading_4"></a>
79+
80+
## As an aside <sup><sup>[top](documentr_top)</sup></sup>
81+
82+
9683

9784
The name ```RouteMaster``` pays homage to the original London buses [(see the wikipedia entry)](http://en.wikipedia.org/wiki/Routemaster) which would take you wherever you would like to go.
9885

9986
The favicon is also related, showing a depiction of the back top window of a routemaster bus.
87+
88+
89+
# Building the Package
90+
91+
## *NIX/Mac OS X
92+
93+
From the root of the project, simply run
94+
95+
`./gradlew build`
96+
97+
98+
## Windows
99+
100+
`./gradlew.bat build`
101+
102+
103+
This will compile and assemble the artefacts into the `build/libs/` directory.
104+
105+
Note that this may also run tests (if applicable see the Testing notes)
106+
107+
# Running the Tests
108+
109+
## *NIX/Mac OS X
110+
111+
From the root of the project, simply run
112+
113+
`gradle --info test`
114+
115+
if you do not have gradle installed, try:
116+
117+
`gradlew --info test`
118+
119+
## Windows
120+
121+
From the root of the project, simply run
122+
123+
`gradle --info test`
124+
125+
if you do not have gradle installed, try:
126+
127+
`./gradlew.bat --info test`
128+
129+
130+
The `--info` switch will also output logging for the tests
131+
132+
# Artefact Publishing - Github
133+
134+
This project publishes artefacts to [GitHub](https://github.com/)
135+
136+
> Note that the latest version can be found [https://github.com/synapticloop/routemaster/releases](https://github.com/synapticloop/routemaster/releases)
137+
138+
As such, this is not a repository, but a location to download files from.
139+
140+
# Artefact Publishing - Bintray
141+
142+
This project publishes artefacts to [bintray](https://bintray.com/)
143+
144+
> Note that the latest version can be found [https://bintray.com/synapticloop/maven/routemaster/view](https://bintray.com/synapticloop/maven/routemaster/view)
145+
146+
## maven setup
147+
148+
this comes from the jcenter bintray, to set up your repository:
149+
150+
```
151+
152+
153+
<?xml version="1.0" encoding="UTF-8" ?>
154+
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd' xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
155+
<profiles>
156+
<profile>
157+
<repositories>
158+
<repository>
159+
<snapshots>
160+
<enabled>false</enabled>
161+
</snapshots>
162+
<id>central</id>
163+
<name>bintray</name>
164+
<url>http://jcenter.bintray.com</url>
165+
</repository>
166+
</repositories>
167+
<pluginRepositories>
168+
<pluginRepository>
169+
<snapshots>
170+
<enabled>false</enabled>
171+
</snapshots>
172+
<id>central</id>
173+
<name>bintray-plugins</name>
174+
<url>http://jcenter.bintray.com</url>
175+
</pluginRepository>
176+
</pluginRepositories>
177+
<id>bintray</id>
178+
</profile>
179+
</profiles>
180+
<activeProfiles>
181+
<activeProfile>bintray</activeProfile>
182+
</activeProfiles>
183+
</settings>
184+
185+
186+
```
187+
188+
## gradle setup
189+
190+
Repository
191+
192+
```
193+
194+
195+
repositories {
196+
maven {
197+
url "http://jcenter.bintray.com"
198+
}
199+
}
200+
201+
202+
```
203+
204+
or just
205+
206+
```
207+
208+
209+
repositories {
210+
jcenter()
211+
}
212+
213+
214+
```
215+
216+
## Dependencies - Gradle
217+
218+
```
219+
220+
221+
dependencies {
222+
runtime(group: 'synapticloop', name: 'routemaster', version: '2.0.0', ext: 'jar')
223+
224+
compile(group: 'synapticloop', name: 'routemaster', version: '2.0.0', ext: 'jar')
225+
}
226+
227+
228+
```
229+
230+
or, more simply for versions of gradle greater than 2.1
231+
232+
```
233+
234+
235+
dependencies {
236+
runtime 'synapticloop:routemaster:2.0.0'
237+
238+
compile 'synapticloop:routemaster:2.0.0'
239+
}
240+
241+
242+
```
243+
244+
## Dependencies - Maven
245+
246+
```
247+
248+
249+
<dependency>
250+
<groupId>synapticloop</groupId>
251+
<artifactId>routemaster</artifactId>
252+
<version>2.0.0</version>
253+
<type>jar</type>
254+
</dependency>
255+
256+
257+
```
258+
259+
## Dependencies - Downloads
260+
261+
262+
You will also need to download the following dependencies:
263+
264+
265+
266+
### cobertura dependencies
267+
268+
- `net.sourceforge.cobertura:cobertura:2.0.3`: (It may be available on one of: [bintray](https://bintray.com/net.sourceforge.cobertura/maven/cobertura/2.0.3/view#files/net.sourceforge.cobertura/cobertura/2.0.3) [mvn central](http://search.maven.org/#artifactdetails|net.sourceforge.cobertura|cobertura|2.0.3|jar))
269+
270+
271+
### compile dependencies
272+
273+
- `synapticloop:templar:1.4.2`: (It may be available on one of: [bintray](https://bintray.com/synapticloop/maven/templar/1.4.2/view#files/synapticloop/templar/1.4.2) [mvn central](http://search.maven.org/#artifactdetails|synapticloop|templar|1.4.2|jar))
274+
- `org.nanohttpd:nanohttpd:2.3.1`: (It may be available on one of: [bintray](https://bintray.com/org.nanohttpd/maven/nanohttpd/2.3.1/view#files/org.nanohttpd/nanohttpd/2.3.1) [mvn central](http://search.maven.org/#artifactdetails|org.nanohttpd|nanohttpd|2.3.1|jar))
275+
276+
277+
### runtime dependencies
278+
279+
- `synapticloop:templar:1.4.2`: (It may be available on one of: [bintray](https://bintray.com/synapticloop/maven/templar/1.4.2/view#files/synapticloop/templar/1.4.2) [mvn central](http://search.maven.org/#artifactdetails|synapticloop|templar|1.4.2|jar))
280+
- `org.nanohttpd:nanohttpd:2.3.1`: (It may be available on one of: [bintray](https://bintray.com/org.nanohttpd/maven/nanohttpd/2.3.1/view#files/org.nanohttpd/nanohttpd/2.3.1) [mvn central](http://search.maven.org/#artifactdetails|org.nanohttpd|nanohttpd|2.3.1|jar))
281+
282+
283+
### testCompile dependencies
284+
285+
- `junit:junit:4.11`: (It may be available on one of: [bintray](https://bintray.com/junit/maven/junit/4.11/view#files/junit/junit/4.11) [mvn central](http://search.maven.org/#artifactdetails|junit|junit|4.11|jar))
286+
- `org.mockito:mockito-all:1.10.19`: (It may be available on one of: [bintray](https://bintray.com/org.mockito/maven/mockito-all/1.10.19/view#files/org.mockito/mockito-all/1.10.19) [mvn central](http://search.maven.org/#artifactdetails|org.mockito|mockito-all|1.10.19|jar))
287+
- `synapticloop:templar:1.4.2`: (It may be available on one of: [bintray](https://bintray.com/synapticloop/maven/templar/1.4.2/view#files/synapticloop/templar/1.4.2) [mvn central](http://search.maven.org/#artifactdetails|synapticloop|templar|1.4.2|jar))
288+
289+
**NOTE:** You may need to download any dependencies of the above dependencies in turn (i.e. the transitive dependencies)
290+
291+
# License
292+
293+
```
294+
295+
296+
The MIT License (MIT)
297+
298+
Copyright (c) 2017 synapticloop
299+
300+
Permission is hereby granted, free of charge, to any person obtaining a copy
301+
of this software and associated documentation files (the "Software"), to deal
302+
in the Software without restriction, including without limitation the rights
303+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
304+
copies of the Software, and to permit persons to whom the Software is
305+
furnished to do so, subject to the following conditions:
306+
307+
The above copyright notice and this permission notice shall be included in all
308+
copies or substantial portions of the Software.
309+
310+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
311+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
312+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
313+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
314+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
315+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
316+
SOFTWARE.

documentr.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"context": {
3+
},
4+
"templates": [
5+
{ "type":"inbuilt", "value":"jvm-compatability" },
6+
{ "type":"inbuilt", "value":"project-name" },
7+
{ "type":"inbuilt", "value":"project-description" },
8+
9+
{ "type": "markup", "value": "\n\n# Table of Contents\n\n" },
10+
11+
{ "type": "toc", "value": "2" },
12+
{ "type": "toclinks", "value": "true" },
13+
{ "type": "toplink", "value": " <a name=\"#documentr_top\"></a>" },
14+
{ "type": "tocbacktotop", "value": " <sup><sup>[top](documentr_top)</sup></sup>" },
15+
16+
{ "type":"file", "value":"src/docs/readme.md" },
17+
18+
{ "type":"inbuilt", "value":"gradle-build" },
19+
{ "type":"inbuilt", "value":"gradle-test" },
20+
21+
{ "type":"inbuilt", "value":"publishing-github" },
22+
{ "type":"inbuilt", "value":"publishing-bintray" },
23+
24+
{ "type":"inbuilt", "value":"dependencies" },
25+
26+
{ "type":"inbuilt", "value":"license-mit" },
27+
28+
{ "type":"inbuilt", "value":"attribution" }
29+
30+
]
31+
}

0 commit comments

Comments
 (0)