-
Notifications
You must be signed in to change notification settings - Fork 39
/
server.js
30 lines (25 loc) · 978 Bytes
/
server.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
import { readdirSync } from 'fs';
import Nullstack from "nullstack";
import path from 'path';
import Application from "./src/Application";
import 'prismjs/components/prism-jsx.min';
const context = Nullstack.start(Application);
const { worker, project } = context;
const illustrations = readdirSync(path.join(__dirname, '../public', 'illustrations'));
const articles = readdirSync(path.join(__dirname, `../i18n/en-US`, 'articles'));
worker.preload = [
...articles.map((article) => '/' + article.replace('.md', '')).filter((article) => article.indexOf('404') === -1),
...illustrations.map((illustration) => '/illustrations/' + illustration),
'/arrow.webp',
'/stars.webp',
'/footer.webp',
'/contributors',
'/roboto-v20-latin-300.woff2',
'/roboto-v20-latin-500.woff2',
'/crete-round-v9-latin-regular.woff2',
]
project.name = 'Nullstack';
project.domain = 'nullstack.app';
project.color = '#d22365';
project.backgroundColor = '#2d3748';
export default context