https://github.com/hmmhmmhm/nested-static
🗂️ Helps register nested folders to the express module.
https://github.com/hmmhmmhm/nested-static
express express-js express-server express-starter folder nested nodejs
Last synced: 20 days ago
JSON representation
🗂️ Helps register nested folders to the express module.
- Host: GitHub
- URL: https://github.com/hmmhmmhm/nested-static
- Owner: hmmhmmhm
- License: mit
- Created: 2019-03-23T09:02:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-23T11:23:00.000Z (about 7 years ago)
- Last Synced: 2025-06-02T00:33:23.797Z (11 months ago)
- Topics: express, express-js, express-server, express-starter, folder, nested, nodejs
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
npm install nested-static --save
```
## Example
```js
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)