-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
34 lines (25 loc) · 966 Bytes
/
app.js
File metadata and controls
34 lines (25 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Full Documentation - https://docs.turbo360.co
const vertex = require('vertex360')({ site_id: process.env.TURBO_APP_ID })
const express = require('express')
const app = express() // initialize app
/* Apps are configured with settings as shown in the conig object below.
Options include setting views directory, static assets directory,
and database settings. Default config settings can be seen here:
https://docs.turbo360.co */
const config = {
views: 'views', // Set views directory
static: 'public', // Set static assets directory
logging: true,
/* To use the Turbo 360 CMS, from the terminal run
$ turbo extend cms
then uncomment line 21 below: */
// db: vertex.nedb()
}
vertex.configureApp(app, config)
// import routes
const index = require('./routes/index')
const api = require('./routes/api') // sample API Routes
// set routes
app.use('/', index)
app.use('/api', api) // sample API Routes
module.exports = app