Description
Frontexpress manages routes in browser like ExpressJS does on Node.
Same language same API on all the stack.
Code the front-end logic with the same style than on the back-end with express
frontexpress alternatives and similar libraries
Based on the "Routing" category.
Alternatively, view frontexpress alternatives based on common mentions on social networks and blogs.
-
SPApp
Single Page Application micro framework. Views, routes and controllers in 60 lines of code
A Non-Cloud Alternative to Google Forms that has it all.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of frontexpress or a related project?
README
An Express.js-Style router for the front-end.
Code the front-end like the back-end. Same language same framework.
import frontexpress from 'frontexpress';
// Front-end application
const app = frontexpress();
// handles http 401
app.use((req, res, next) => {
if (res.status === 401) {
window.alert('You are not authenticated! Please sign in.');
} else {
next();
}
});
app.get('/', (req, res) => {
document.querySelector('.content').innerHTML = 'Hello World!';
});
app.post('/login/:user', (req, res) => {
document.querySelector('.content').innerHTML = `Welcome ${req.params.user}!`;
});
// start listening front-end requests (emitted/received)
app.listen();
Features
✔️ You already know ExpressJS then you know FrontExpress
✔️ Simple, minimal core extendable through plugins
✔️ Lighweight framework
✔️ Build your front-end application by handling routes
✔️ Ideal for Single Page Application
✔️ Manage ajax requests and browser history
Installation
From npm repository
$ npm install frontexpress
From bower repository
$ bower install frontexpress
From CDN
On jsDelivr
Documentation
Tests
Clone the repository:
$ git clone [email protected]:camelaissani/frontexpress.git
$ cd frontexpress
Install the dependencies and run the test suite:
$ npm install
$ npm test
License
[MIT](LICENSE)
*Note that all licence references and agreements mentioned in the frontexpress README section above
are relevant to that project's source code only.