0.2.0 • Published 2 years ago

liquidate v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Liquidate

Installation

npm install liquidate

Usage

// entry.js

const Home = (props) => <h1>Hello{props.name ? `, ${props.name}!` : "!"}</h1>;

const About = () => <h1>This is Liquidate</h1>;

export const routes = {
  "/": {
    Component: Home,
    getInitialProps: ({ query }) => ({
      name: query.name,
    }),
  },
  "/about": {
    Component: About,
  },
};

// optional
export const PORT = 3000;
// package.json

{
    "scripts": {
        "build": "liquidate build",
        "start": "liquidate start"
    }
}