0.0.4 • Published 6 years ago

yeps-index v0.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

YEPS index

YEPS Static index.html file serving

NPM

npm version Build Status Coverage Status Linux Build Windows Build

Dependency Status devDependency Status NSP Status

License GitHub stars GitHub forks GitHub issues Twitter

How to install

npm i -S yeps-index debug

How to use

const App = require('yeps');
    
const index = require('yeps-index');
    
const error = require('yeps-error');
const logger = require('yeps-logger');
const server = require('yeps-server');
    
const { resolve } = require('path');
    
const app = new App();
    
app.all([
  error(),
  logger(),
  index({
    root: resolve(__dirname, 'dist'),
  }),
]);
    
server.createHttpServer(app);

Or with options:

app.all([
  error(),
  logger(),
  serve({
    root: resolve(__dirname, 'dist'),
    index: 'index.html',
    url: '/',
  }),
]);

Url "/index.html" will be redirected to "/" with 301 http code.

YEPS documentation

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago