Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ECorreia45 committed Jul 6, 2021
1 parent 6c89b2d commit ddc7b16
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions README.md
Expand Up @@ -52,17 +52,19 @@ const {engine} = require('@beforesemicolon/html-plus');

const app = express();

// initialize the engine by passing the express app
// and the absolute path to the HTML pages directory
// everything else is taken care of for you
// from routing to processing linked files on your pages
engine(app, path.resolve(__dirname, './pages'));

const server = http.createServer(app);

server.listen(3000, () => {
console.log('listening on port 3000');
})
(async () => {
// initialize the engine by passing the express app
// and the absolute path to the HTML pages directory
// everything else is taken care of for you
// from routing to processing linked files on your pages
await engine(app, path.resolve(__dirname, './pages'));

const server = http.createServer(app);

server.listen(3000, () => {
console.log('listening on port 3000');
})
})()
```

With the above setup you can organize your html files in a structure that you would like
Expand Down

0 comments on commit ddc7b16

Please sign in to comment.