generator-prospa
Version:
Create fully working Single Page Applications using various technology combinations
82 lines (54 loc) • 2.07 kB
Markdown
<%= name %>
===
<%= description %>
This project was automatically generated by [<%= generatorName %>](<%= generatorUrl%>).
This is a fully working Single Page Application with properly configured client *and* server-side routing.
Full Compile and Build
In a command-window, type:
```
mvn clean install
```
Running the Server
To run the "full" server, i.e. a production build of the front-end application together with the web-services API, in
a command-window type:
```
<%- include(`run-${framework}.md`); -%>
```
In a web-browser, go to:
```
http://localhost:<%= serverPort %>
```
A development server for the front-end application can be run in the usual way - this will be explained below.
Routing
Fully working client *and* server-side routing is implemented.
All server-side routes like those below will be properly routed to the client for client-side routing:
```
http://localhost:<%= serverPort %>
http://localhost:<%= serverPort %>/index.html
http://localhost:<%= serverPort %>/users
http://localhost:<%= serverPort %>/users/{username}
http://localhost:<%= serverPort %>/this/route/does/not/exist
```
JSON API
Web-services are provided at the "/api" path:
```
GET http://localhost:<%= serverPort %>/api/users
GET http://localhost:<%= serverPort %>/api/users/{username}
GET http://localhost:<%= serverPort %>/api/version
```
Any attempt to access a non-existing API path will result in a standard "HTTP 400 Bad Request" response.
Front-end Application
The front-end application uses all of the usual framework toolchain, there is nothing special needed to configure or
use the application.
All of the usual front-end tools will work, including running a development version of the application, using a
web-services API proxy, and building a client package.
[PENDING framework specific instructions yarn/node serve/build etc]
Web-Services API Proxy
When the application is running in development mode, web-service API requests can be proxied to a development server:
<%- include(`proxy-${frontEnd}.md`); -%>