-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.cmmv.config.js
93 lines (83 loc) · 3.87 KB
/
.cmmv.config.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
require('dotenv').config();
const port = (process.env.PORT) ? parseInt(process.env.PORT) : 3000;
module.exports = {
env: process.env.NODE_ENV,
docs: {
lang: process.env.DOCS_LANG || "en"
},
server: {
host: "0.0.0.0",
port: port,
poweredBy: false,
removePolicyHeaders: true,
publicDirs: ["public", "public/views"],
render: "@cmmv/view",
compress: {
enabled: true,
options: {
level: 6
}
},
cors: true,
helmet: {
enabled: false,
options: {
contentSecurityPolicy: false
}
},
vite: true
},
i18n: {
localeFiles: "./src/locale",
default: process.env.DOCS_LANG || "en"
},
rpc: {
enabled: false
},
view: {
extractInlineScript: false,
minifyHTML: true
},
head: {
title: "Documentation | CMMV - A minimalistic Node.js framework",
htmlAttrs: {
lang: "en-US"
},
meta: [
{ charset: 'utf-8' },
{ "http-equiv": "content-type", content: "text/html; charset=UTF-8" },
{ name: 'description', content: 'CMMV is a minimalist Node.js framework focused on contract-driven development, combining automatic code generation, RPC communication, and declarative programming to build efficient, scalable applications with simplified backend and frontend integration.' },
{ name: 'keywords', content: 'CMMV, Node.js framework, contract-driven development, RPC communication, TypeScript, automatic code generation, backend, frontend integration, scalable applications, minimalist framework, WebSocket, HTTP, high-performance.' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: "robots", content: "index,follow" },
{ name: "twitter:card", content: "summary_large_image" },
{ name: "twitter:site", content: "@cmmvjs" },
{ name: "twitter:image", content: "https://raw.githubusercontent.com/cmmvio/docs.cmmv.io/main/public/assets/social/cmmv_twittercard.png" },
{ name: "twitter:description", content: "CMMV (Contract Model Model View) is a revolution in web application development" },
{ property: "og:title", content: "CMMV - Minimalistic Node.js Server Framework" },
{ property: "og:description", content: "CMMV (Contract Model Model View) is a revolution in web application development" },
{ property: "og:url", content: "https://cmmv.io/" },
{ property: "og:type", content: "website" },
{ property: "og:image", itemprop: "image", content: "https://raw.githubusercontent.com/cmmvio/docs.cmmv.io/main/public/assets/social/cmmv_opengraph_card.png" },
{ property: "og:image:alt", content: "altText of the image" },
{ property: "og:site_name", content: "CMMV" }
],
link: [
{ rel: 'icon', href: '/assets/favicon/favicon.ico' },
{ rel: 'shortcut', href: '/assets/favicon/favicon-32x32.png' },
{ rel: 'apple-touch-icon', href: '/assets/favicon/favicon-32x32.png' },
{ rel: "dns-prefetch", href: "https://cmmv.io" },
{ rel: "preconnect", href: "https://cmmv.io" },
{ rel: "stylesheet", href: "/assets/tailwind.min.css" },
{ rel: "stylesheet", href: "/assets/docs.css" }
]
},
headers: {
"cross-origin-resource-policy": "cross-orign"
},
scripts: [
{ type: "text/javascript", src: "/assets/bundle.min.js", defer: "defer" },
{ type: "text/javascript", src: "https://cdn.jsdelivr.net/npm/@docsearch/js@3", defer: "defer" },
{ type: "text/javascript", src: "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/js/all.min.js", async: "async" },
]
};