New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@blubox/assets

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blubox/assets

Serve static files with blubox

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@blubox/assets

Serve static files with Blubox

Installation

npm i @blubox/assets

Quick start

Install dependencies

npm install blubox @blubox/assets

Create a Blubox application

const { Controller, Router, App } = require('blubox')

const controller = new Controller()

const app = new App(new Router({}))
app.listen(3000)

Use assets controller

const assets = require('@blubox/assets')
const path = require('path')

const app = new App(
	new Router({
		assets: assets({ dir: path.join(__dirname, '../public'), replace: 'assets' }),
	})
)

Assets Options

/**
 * assets(options, controller)
 *
 * @param {Object} [options]
 *  - {String} dir `Absolute location of file directory`
 *  - {String} raplace `Patname of the path where the files controller is located`
 * @return {Function} assets controller
 *
 */

License

MIT

Keywords

assets

FAQs

Package last updated on 10 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts