2.0.2 • Published 6 years ago

hinos-serve v2.0.2

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

hinos-serve

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

Install

npm i hinos-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 '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'),
}));
2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.2

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago