Skip to content

maisiesadler/ImgServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ImgServer

A small js library for serving static files

Supported types:

  • .html
  • .txt
  • .css
  • .gif
  • .jpg
  • .png
  • .svg
  • .js

Example:

var server = new imgServer({
    dir: filePath,
    port: 3000
});
server.start();

Or, if you want to map multiple locations:

var server = new imgServer({
    map: [
        {
            from: '/t',
            to: filePath1
        },
        {
            from: '/m',
            to: filePath2
        }
    ],
    port: 3000
});
server.start();

About

A small js library for serving static files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages