2018-02-07 11:57:20 +01:00
|
|
|
const express = require('express')
|
2018-02-07 11:41:24 +01:00
|
|
|
const app = express()
|
|
|
|
|
2018-02-13 22:13:42 +01:00
|
|
|
app.set('views', `${__dirname}/views`)
|
2018-02-09 15:00:30 +01:00
|
|
|
app.set('view engine', 'html')
|
2018-02-13 22:13:42 +01:00
|
|
|
app.engine('html', require('../../dist/cometa').__express)
|
2018-02-07 11:41:24 +01:00
|
|
|
|
|
|
|
app.get('/', (req, res) => {
|
2018-02-07 11:57:20 +01:00
|
|
|
res.render('index', {
|
|
|
|
title: 'Cometa!',
|
2018-02-07 11:41:24 +01:00
|
|
|
arr: [{
|
2018-02-07 11:57:20 +01:00
|
|
|
show: true,
|
|
|
|
msg: 'Show meee',
|
2018-02-07 11:41:24 +01:00
|
|
|
}, {
|
2018-02-07 11:57:20 +01:00
|
|
|
show: false,
|
|
|
|
msg: 'I\'m hidden :(',
|
2018-02-07 11:41:24 +01:00
|
|
|
}],
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
app.listen(3000, () => console.log('Example app listening on port 3000!'))
|