refactor: static path
This commit is contained in:
parent
c5f08ddbd9
commit
031f78ce27
8 changed files with 20 additions and 20 deletions
|
@ -53,10 +53,10 @@
|
|||
"test": "jest --verbose --detectOpenHandles",
|
||||
"test-watch": "jest --verbose --watchAll",
|
||||
"dev": "./node_modules/.bin/tsc --watch",
|
||||
"serve": "env ASSETS_PATH=./assets/development ./node_modules/.bin/nodemon dist/app.js",
|
||||
"serve": "env NODE_ENV=development ./node_modules/.bin/nodemon dist/app.js",
|
||||
"build": "./node_modules/.bin/tsc",
|
||||
"assets": "./node_modules/.bin/gulp build",
|
||||
"start": "env ASSETS_PATH=./assets/production node ./dist/app.js"
|
||||
"start": "env NODE_ENV=production node ./dist/app.js"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"devDependencies": {
|
||||
|
|
|
@ -125,9 +125,9 @@ let main = async () => {
|
|||
|
||||
//app.post('/api/media', MediaController.uploadRoute())
|
||||
//app.delete('/api/media/:key', MediaController.delete)
|
||||
const assetsPath: string = process.env.ASSETS_PATH === undefined ? './assets/development' : process.env.ASSETS_PATH
|
||||
|
||||
app.use(express.static(path.resolve(assetsPath)))
|
||||
//const assetsPath: string = process.env.ASSETS_PATH === undefined ? './assets/development' : process.env.ASSETS_PATH
|
||||
|
||||
app.use('/static', express.static(path.resolve('./assets/development')))
|
||||
|
||||
app.get('/500', ErrorController.internalError)
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@ Github: https://github.com/lefuturiste
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="icon" type="image/png" href="/imgs/favicon.png" />
|
||||
<link rel="icon" type="image/png" href="/static/imgs/favicon.png" />
|
||||
|
||||
<title>{% block title %}{% endblock %} | Forum des associations 2020</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Slab&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/styles/main.css" />
|
||||
<link rel="stylesheet" href="/static/styles/main.css" />
|
||||
{% if layout is not defined %}
|
||||
<link rel="stylesheet" href="/styles/home.css" />
|
||||
<link rel="stylesheet" href="/static/styles/home.css" />
|
||||
{% endif %}
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
|
@ -29,7 +29,7 @@ Github: https://github.com/lefuturiste
|
|||
<div class="container header-container">
|
||||
<div class="header-left">
|
||||
<div class="header-image">
|
||||
<a href="/"><img src="/imgs/espace_condorcet_logo.jpg" /></a>
|
||||
<a href="/"><img src="/static/imgs/espace_condorcet_logo.jpg" /></a>
|
||||
</div>
|
||||
<div class="header-content">
|
||||
<a
|
||||
|
@ -72,6 +72,6 @@ Github: https://github.com/lefuturiste
|
|||
</div>
|
||||
|
||||
{% block scripts %}{% endblock %}
|
||||
<script src="/scripts/main.js"></script>
|
||||
<script src="/static/scripts/main.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -2,7 +2,7 @@
|
|||
{% block title %}Accueil{% endblock %}
|
||||
{% block head %}
|
||||
{% include './home-metas.twig' %}
|
||||
<link rel="stylesheet" href="/styles/countdown.css" />
|
||||
<link rel="stylesheet" href="/static/styles/countdown.css" />
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="countdown" id="countdown">
|
||||
|
@ -37,5 +37,5 @@
|
|||
<script>
|
||||
let openDate = new Date(`{{ openDate }}`)
|
||||
</script>
|
||||
<script src="/scripts/countdown.js"></script>
|
||||
<script src="/static/scripts/countdown.js"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "./base.twig" %}
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="/styles/error.css" />
|
||||
<link rel="stylesheet" href="/static/styles/error.css" />
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="error-container">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% set metaDescription = "Découvrez la riche vie associative autour de Gaillon-Aubevoye grâce au forum virtuel mis en place par l'Espace Condorcet" %}
|
||||
|
||||
<meta name="msapplication-TileColor" content="#D35400">
|
||||
<meta name="msapplication-TileImage" content="/imgs/espace_condorcet_logo.jpg">
|
||||
<meta name="msapplication-TileImage" content="/static/imgs/espace_condorcet_logo.jpg">
|
||||
|
||||
<meta name="theme-color" content="#D35400">
|
||||
|
||||
|
@ -13,11 +13,11 @@
|
|||
<meta property="og:title" content="Forum virtuel des associations 2020">
|
||||
<meta property="og:description" content="{{ metaDescription }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:image" content="/imgs/espace_condorcet_logo.jpg">
|
||||
<meta property="og:image" content="/static/imgs/espace_condorcet_logo.jpg">
|
||||
<meta property="og:url" content="https://associations.espacecondorcet.org/">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="Forum virtuel des associations 2020">
|
||||
<meta name="twitter:url" content="https://associations.espacecondorcet.org/">
|
||||
<meta name="twitter:image:src" content="/imgs/espace_condorcet_logo.jpg">
|
||||
<meta name="twitter:image:src" content="/static/imgs/espace_condorcet_logo.jpg">
|
||||
<meta name="twitter:description" content="{{ metaDescription }}">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% block title %}Accueil{% endblock %}
|
||||
{% block head %}
|
||||
{% include './home-metas.twig' %}
|
||||
<link rel="stylesheet" href="/styles/home.css" />
|
||||
<link rel="stylesheet" href="/static/styles/home.css" />
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="nav">
|
||||
|
@ -84,5 +84,5 @@
|
|||
let isProposed = {{ isProposed }}
|
||||
let organizations = JSON.parse(`{{ organizationsJSON|escape('js') }}`)
|
||||
</script>
|
||||
<script src="/scripts/home.js"></script>
|
||||
<script src="/static/scripts/home.js"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "./base.twig" %}
|
||||
{% block title %}{{ data.name }}{% endblock %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="/styles/organization.css" />
|
||||
<link rel="stylesheet" href="/static/styles/organization.css" />
|
||||
<meta name="description" content="{{ data.descriptionShort|e }}">
|
||||
{#<meta name="keywords" content="Gaillon,association,">#}
|
||||
|
||||
|
@ -456,5 +456,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="/scripts/organization.js"></script>
|
||||
<script src="/static/scripts/organization.js"></script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue