|
146 | 146 | import javaslang.control.Try; |
147 | 147 |
|
148 | 148 | /** |
149 | | - * <h1>Getting Started:</h1> |
| 149 | + * <h1>jooby</h1> |
150 | 150 | * <p> |
151 | 151 | * A new application must extends Jooby, register one ore more {@link Renderer} and some |
152 | 152 | * {@link Route routes}. It sounds like a lot of work to do, but it isn't. |
|
159 | 159 | * renderer(new Json()); // 1. JSON serializer. |
160 | 160 | * |
161 | 161 | * // 2. Define a route |
162 | | - * get("/", (req, rsp) {@literal ->} { |
| 162 | + * get("/", req {@literal ->} { |
163 | 163 | * Map{@literal <}String, Object{@literal >} model = ...; |
164 | | - * rsp.send(model); |
| 164 | + * return model; |
165 | 165 | * } |
166 | 166 | * } |
167 | 167 | * |
168 | 168 | * public static void main(String[] args) throws Exception { |
169 | | - * new MyApp().start(); // 3. Done! |
| 169 | + * run(MyApp::new, args); // 3. Done! |
170 | 170 | * } |
171 | 171 | * } |
172 | 172 | * </pre> |
173 | 173 | * |
174 | | - * <h1>Properties files</h1> |
| 174 | + * <h2>application.conf</h2> |
175 | 175 | * <p> |
176 | 176 | * Jooby delegate configuration management to <a |
177 | 177 | * href="https://github.com/typesafehub/config">TypeSafe Config</a>. If you are unfamiliar with <a |
|
212 | 212 | * System properties takes precedence over any application specific property. |
213 | 213 | * </p> |
214 | 214 | * |
215 | | - * <h1>env</h1> |
| 215 | + * <h2>env</h2> |
216 | 216 | * <p> |
217 | 217 | * Jooby defines two modes: <strong>dev</strong> or something else. In Jooby, <strong>dev</strong> |
218 | 218 | * is special and some modules could apply special settings while running in <strong>dev</strong>. |
|
228 | 228 | * There is more at {@link Env} so take a few minutes to discover what a {@link Env} can do for you. |
229 | 229 | * </p> |
230 | 230 | * |
231 | | - * <h1>Modules</h1> |
| 231 | + * <h2>modules: the jump to full-stack framework</h2> |
232 | 232 | * <p> |
233 | 233 | * {@link Jooby.Module Modules} are quite similar to a Guice modules except that the configure |
234 | 234 | * callback has been complementing with {@link Env} and {@link Config}. |
|
247 | 247 | * {@link Jooby.Module} can do for you. |
248 | 248 | * </p> |
249 | 249 | * |
250 | | - * <h1>Path Patterns</h1> |
| 250 | + * <h2>path patterns</h2> |
251 | 251 | * <p> |
252 | 252 | * Jooby supports Ant-style path patterns: |
253 | 253 | * </p> |
|
264 | 264 | * <li>{@code *} - matches any path at any level, shorthand for {@code **}/{@code *}.</li> |
265 | 265 | * </ul> |
266 | 266 | * |
267 | | - * <h2>Variables</h2> |
| 267 | + * <h3>variables</h3> |
268 | 268 | * <p> |
269 | 269 | * Jooby supports path parameters too: |
270 | 270 | * </p> |
|
278 | 278 | * <code>id</code> var.</li> |
279 | 279 | * </ul> |
280 | 280 | * |
281 | | - * <h1>Routes</h1> |
| 281 | + * <h2>routes</h2> |
282 | 282 | * <p> |
283 | 283 | * Routes perform actions in response to a server HTTP request. There are two types of routes |
284 | 284 | * callback: {@link Route.Handler} and {@link Route.Filter}. |
|
331 | 331 | * }); |
332 | 332 | * </pre> |
333 | 333 | * |
334 | | - * <h2>Mvc Route</h2> |
| 334 | + * <h3>mvc routes</h3> |
335 | 335 | * <p> |
336 | 336 | * A Mvc route use annotations to define routes: |
337 | 337 | * </p> |
|
359 | 359 | * {@link org.jooby.mvc.Produces} {@link org.jooby.mvc.Consumes} . |
360 | 360 | * </p> |
361 | 361 | * |
362 | | - * <h1>Static Files</h1> |
| 362 | + * <h2>static files</h2> |
363 | 363 | * <p> |
364 | 364 | * Static files, like: *.js, *.css, ..., etc... can be served with: |
365 | 365 | * </p> |
|
370 | 370 | * <p> |
371 | 371 | * Classpath resources under the <code>/assets</code> folder will be accessible from client/browser. |
372 | 372 | * </p> |
373 | | - * <h1>Bootstrap</h1> |
| 373 | + * |
| 374 | + * <h2>bootstrap</h2> |
374 | 375 | * <p> |
375 | 376 | * The bootstrap process is defined as follows: |
376 | 377 | * </p> |
|
0 commit comments