Skip to content
/ quickpage Public template

Quickpage is github template for creating single page application with front-end routing. See demo at official page https://quickpage.foxdebug.com.

License

Notifications You must be signed in to change notification settings

deadlyjack/quickpage

Repository files navigation

Quickpage

Quickpage is a GitHub template for creating single-page-application with front-end routing and JSX. See demo at official page https://quickpage.foxdebug.com.

Usage

Create github repository using this template.

Documentation

Start server

To start the server run the following bash command

: yarn start

To start the dev-server run the following bash command

: yarn start-dev

Build the application

: yarn build-release

The server uses 'NodeJs' and 'ExpressJs' for serving files. You can edit the server src code in server directory.

Routing

import Router from 'lib/Router';

Add routes.

Router.add('/home', (params, queries) => {
  // render home
});

Start route.

Router.listen();

Create separate routing page

Create a router page

touch adminRouter.js

Initialize router page.

// adminRouter.js
import Router from 'lib/RouterExtension';

const router = new Router('/admin');

// routes

export default router;

Add middle function to filter routes.

Router.beforeNavigate((url, next) => {
  // url -> current url
  // next -> callback function
  // call next function to proceed
});

Add a route.

Router.add('home', (params, queries) => {
  // render '/base-route/home'
});

Add router to main Router.

import adminRouter from './adminRouter';
import Router from 'lib/Router';

Router.use(adminRouter);
Router.listen();

About

Quickpage is github template for creating single page application with front-end routing. See demo at official page https://quickpage.foxdebug.com.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published