1.0.0 • Published 5 years ago

poom-serve v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

poom-serve

A plugin helps route static resource (.jpg, .png, .zip...) for poom

Install

npm i poom-serve -S

Features

  1. Serve static resources to download
  2. Base on querystring ?name=abc&download=true it's will auto add attachment file name to download

Examples

Typescript

import { Server } from 'poom';
import { serve } from 'poom-serve';

Server.use(serve({
    '/images': path.join(__dirname, 'path to folder which contains resource files'),
    '/files': path.join(__dirname, 'path to folder which contains resource files'),
}));

Javascript

const poom = require("poom");
const poomServe = require("poom-serve");

poom.Server.use(poomServe.serve({
    '/images': path.join(__dirname, 'path to folder which contains resource files'),
    '/files': path.join(__dirname, 'path to folder which contains resource files'),
}));
1.0.0

5 years ago

0.0.1

6 years ago