Skip to content

๐Ÿ—‚๏ธ Helps register nested folders to the express module.

License

Notifications You must be signed in to change notification settings

hmmhmmhm/nested-static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

nested-static

๐Ÿ—‚๏ธ Helps register nested folders to the express module.

THIS MODULE SUPPORT TYPESCRIPT(.d.ts)

When using Express module, if you register a folder as a function such as us, Can experience it, the folder in that folder does not automatically register a url. nested-static helps you register nested folders in these situations.

Installation

npm install nested-static --save

Example

const nestedStatic = require("nested-static")

nestedStatic(`${__dirname}/../static`, (folders)=>{
    for(let {staticPath, subPath} of folders){
        console.log (`Folder Registered ${staticPath} to ${subPath}`)
        app.use(subPath, express.static(staticPath))
    }
})

License

MIT Licensed. (Copyleft)

About

๐Ÿ—‚๏ธ Helps register nested folders to the express module.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published