Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
generateur-slogans
Commits
d4b8f015
Verified
Commit
d4b8f015
authored
Oct 04, 2017
by
Thibaut Broggi
Browse files
Use ejs as template engine
Fix open graph tags
parent
bbbbe803
Pipeline
#1325
passed with stage
in 32 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
d4b8f015
...
...
@@ -13,6 +13,7 @@
"license"
:
"
GPL-3.0
"
,
"dependencies"
:
{
"
canvas
"
:
"
2.0.0-alpha.5
"
,
"
ejs
"
:
"
^2.5.7
"
,
"
express
"
:
"
^4.16.1
"
}
}
srv.js
View file @
d4b8f015
...
...
@@ -8,6 +8,7 @@ const app = express();
const
config
=
require
(
'
./config.json
'
);
app
.
set
(
'
x-powered-by
'
,
false
);
app
.
set
(
'
view engine
'
,
'
ejs
'
);
app
.
use
(
express
.
static
(
'
./static
'
));
// {name: filepath}
...
...
@@ -106,7 +107,7 @@ app.get('/generate.png', function (req, res) {
});
app
.
get
(
'
/
'
,
function
(
req
,
res
)
{
res
.
s
end
file
(
'
./static/index.html
'
);
res
.
r
end
er
(
'
index
'
,
{
host
:
req
.
headers
.
host
}
);
})
app
.
listen
(
process
.
env
.
PORT
||
config
.
port
||
80
);
static
/index.
html
→
views
/index.
ejs
View file @
d4b8f015
...
...
@@ -4,9 +4,9 @@
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
property=
"og:title"
content=
"Soutenez La Quadrature du Net !"
/>
<meta
property=
"og:type"
content=
""
/>
<meta
property=
"og:url"
content=
"
.
"
/>
<meta
property=
"og:image"
content=
"
.
/generate.png"
/>
<meta
property=
"og:type"
content=
"
Soutenez La Quadrature du Net !
"
/>
<meta
property=
"og:url"
content=
"
http://<%= host %>
"
/>
<meta
property=
"og:image"
content=
"
http://<%= host %>
/generate.png"
/>
<link
rel=
"stylesheet"
href=
"./bootstrap-grid.min.css"
/>
<link
rel=
"stylesheet"
href=
"./font-awesome.min.css"
/>
<link
rel=
"stylesheet"
href=
"./style.css"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment