view-source

0.3.2 • Public • Published

view-source

view-source

An Express.js add-on to render source code. Use it if you need to show source code of a project over the web.

Usage

Install it via npm i view-source (or yarn add view-source). Then the following:

const express = require('express');
const { viewSource } = require('view-source');

const app = express();

viewSource({
  appTitle: 'My App Name',
  app,
  route: '/code',
  source: __dirname + '/../'
});

Where route is the path from which you'll access the viewer and source is the actual physical place where the files are located.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i view-source

    Weekly Downloads

    6

    Version

    0.3.2

    License

    MIT

    Unpacked Size

    589 kB

    Total Files

    10

    Last publish

    Collaborators

    • krasimir