hinos-serve
A plugin helps route static resource (.jpg, .png, .zip...) for hinos
Install
npm i hinos-serve -S
Features
- Serve static resources to download
- Base on querystring
?name=abc&download=true
it's will auto add attachment file name to download
Examples
Typescript
import { Server } from 'hinos';import { serve } from 'hinos-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 hinos = require("hinos");const hinosServe = require("hinos-serve"); hinos.Server.use(hinosServe.serve({ '/images': path.join(__dirname, 'path to folder which contains resource files'), '/files': path.join(__dirname, 'path to folder which contains resource files'),}));