-
Notifications
You must be signed in to change notification settings - Fork 0
Static Assets
Danny SMc edited this page Oct 10, 2020
·
6 revisions
The standard support for serving static assets is still available and the framework object has a proxy function for that, see below.
import { Framework } from 'rewyre';
(async () => {
const application: Framework = new Framework({
db_enable: true,
db_database: 'demo-rewyre-app',
port: 8080,
});
// The first param is the folder path and the last param is the URL prefix, this is optional and can be left out to use the base path.
application.useStatic('../public', '/public');
await application.start();
})();