0

I'm building a website based on a bought theme. I want to serve the theme folder so my customer can have a look at the unmodified version of theme and choose components.

With express, i can do this :

var express = require('express');
var app = express();
app.use('/theme', express.static('my_theme', {'icons': true}));

I didn't find how to do this with total.js.

Mat'arangéÇa
  • 174
  • 1
  • 13
  • 1
    Hi you can place the folder in public directory `./public/theme` or alernatively create a mapping using `F.map();` see docs for more https://docs.totaljs.com/latest/en.html#api~Framework~framework.map – Molda Dec 19 '16 at 15:38
  • How could I not figure it out ! Tank you, it's working. – Mat'arangéÇa Dec 19 '16 at 17:28

1 Answers1

1

Put theme folder inside public/ folder works but, bought theme are usually shipped with a documentation folder and more so it could be useful to browse them.
total.js provide a module to browse folder : directorylisting. It work well with public folder but take a note it doesn't with F.map() who provide a way to map a folder.

Mat'arangéÇa
  • 174
  • 1
  • 13