Skip to content

Mandrewdarts/Rex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rex

Simple single page app pre renderer cli

Use

Just tell rex where your app is.

rex dist

Options

By default rex will only render the '/' route. You can pass the routes you want prerendered using the --routes flag.

rex dist --routes=/,/contact,/blog

You can also specify a port number. Defaults to 3000.

rex dist --port 8080

The output should be

  • index.html
  • contact/index.html
  • blog/index.html

Config File

You can also add a config file named rex.config.js, This file merges with the cli options.

// rex.config.js

module.exports = function() {
  return {
    directory: 'dist' // path to to serve
    routes: ['/', '/contact', '/blog'],
    port: 4200
  }
}