mirror of
https://gitlab.silvrtree.co.uk/martind2000/frontexpress.git
synced 2025-01-12 04:05:10 +00:00
merge
This commit is contained in:
commit
db13c4fe0c
44
README.md
44
README.md
@ -1,9 +1,3 @@
|
|||||||
>
|
|
||||||
>
|
|
||||||
> ## Caution README in progress
|
|
||||||
>
|
|
||||||
>
|
|
||||||
|
|
||||||
# frontexpress
|
# frontexpress
|
||||||
|
|
||||||
Minimalist front end router framework a la [express](http://expressjs.com/)
|
Minimalist front end router framework a la [express](http://expressjs.com/)
|
||||||
@ -20,10 +14,8 @@ app.get('/', (req, res) => {
|
|||||||
window.alert('Hello World');
|
window.alert('Hello World');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Once DOM is loaded start listening HTTP requests
|
// start listening frontend application requests
|
||||||
document.addEventListener("DOMContentLoaded", (event) => {
|
app.listen();
|
||||||
app.listen();
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@ -34,26 +26,7 @@ $ npm install frontexpress
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
The quickest way to get started with frontexpress is to clone [frontexpress sample](https://github.com/camelaissani/frontexpress) to generate an application as shown below:
|
The quickest way to get started with frontexpress is to clone [frontexpress-demo](https://github.com/camelaissani/frontexpress-demo)
|
||||||
|
|
||||||
Clone the git repository:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ git clone git@github.com:camelaissani/frontexpress-sample.git
|
|
||||||
$ cd frontexpress-sample
|
|
||||||
```
|
|
||||||
|
|
||||||
Install dependencies:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
Start the server:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm start
|
|
||||||
```
|
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
@ -71,6 +44,17 @@ $ npm install
|
|||||||
$ npm test
|
$ npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Disclaimer
|
||||||
|
|
||||||
|
>
|
||||||
|
> In this first version of frontexpress, the API is not completely the miror of the expressjs one.
|
||||||
|
>
|
||||||
|
> There are some missing methods. Currently, the use, get, post... methods having a middlewares array as parameter are not available.
|
||||||
|
> The string pattern to define route paths is not yet implemented.
|
||||||
|
>
|
||||||
|
> Obviously, the objective is to have the same API as expressjs when the methods make sense browser side.
|
||||||
|
>
|
||||||
|
|
||||||
## Routing
|
## Routing
|
||||||
|
|
||||||
### Basic routing
|
### Basic routing
|
||||||
|
Loading…
Reference in New Issue
Block a user