-
Notifications
You must be signed in to change notification settings - Fork 0
Static Assets
Danny Springett-McHugh edited this page Oct 9, 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 URL path and the last param is the folder path.
application.useStatic('/public', '../public');
await application.start();
})();