-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.js
37 lines (28 loc) · 950 Bytes
/
index.js
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
35
36
37
// import devtools from 'choo-devtools'
import choo from 'choo'
import store from './stores/store.js'
import i18next from 'i18next'
import i18nextBrowserLanguageDetector from 'i18next-browser-languagedetector'
import languageResources from './locales.js'
i18next
.use(i18nextBrowserLanguageDetector)
.init({
debug: true,
fallbackLng: 'en',
resources: languageResources,
})
var app = choo({ hash: true })
// app.use(devtools())
app.use(store)
import mainView from './views/main.js'
app.route('/', mainView)
app.route('/docs', mainView)
app.route('/hydra-functions', mainView)
app.route('#functions/:function/:tab', mainView)
app.route('/docs/functions/:function/:tab', mainView)
app.route('/hydra-functions/functions/:function/:tab', mainView)
app.route('/api', mainView)
app.route('/api/functions/:function/:tab', mainView)
app.route('/functions', mainView)
app.route('/functions/functions/:function/:tab', mainView)
app.mount('body')