Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathserver.js
More file actions
Latest commit
30 lines (25 loc) · 978 Bytes
/
Copy pathserver.js
File metadata and controls
30 lines (25 loc) · 978 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
import{readdirSync}from'fs';
importNullstackfrom"nullstack";
importpathfrom'path';
importApplicationfrom"./src/Application";
import'prismjs/components/prism-jsx.min';
constcontext=Nullstack.start(Application);
const{ worker, project }=context;
constillustrations=readdirSync(path.join(__dirname,'../public','illustrations'));
constarticles=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';
exportdefaultcontext