Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit bd2b89e6 authored by Martin Déclert's avatar Martin Déclert
Browse files

Modification de l'emplacement des vues

parent f5e17e7e
No related branches found
No related tags found
No related merge requests found
.env
node_modules/
\ No newline at end of file
......@@ -336,6 +336,11 @@
"is-obj": "^2.0.0"
}
},
"dotenv": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
},
"duplexer3": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
......
......@@ -18,6 +18,7 @@
},
"homepage": "https://github.com/MartDec/MartDec.github.io#readme",
"dependencies": {
"dotenv": "^8.2.0",
"express": "^4.17.1",
"nodemon": "^2.0.4",
"path": "^0.12.7"
......
require('dotenv').config()
const express = require('express')
const path = require('path')
const PORT = 8000
const PORT = process.env.PORT
const Router = require('./router')
......@@ -12,8 +13,9 @@ class Server {
}
init () {
this.server.set('views', __dirname + '/www')
this.server.use(express.static(path.join(__dirname, 'www')))
this.server.use(express.static('www'))
this.server.set('views', __dirname + '/www/views')
this.server.use(express.static(path.join(__dirname, 'www/views')))
this.server.use('/', this.router.listen())
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment