Skip to content
Snippets Groups Projects
Commit 444f59bd authored by nicolas.paschoud's avatar nicolas.paschoud
Browse files

New structure and now a front-end

parent 2d64b984
No related branches found
No related tags found
No related merge requests found
Showing
with 53 additions and 11 deletions
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/styles/style.css">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title> <title>Document</title>
</head> </head>
...@@ -10,13 +11,13 @@ ...@@ -10,13 +11,13 @@
<h1>Hyperdrive</h1> <h1>Hyperdrive</h1>
<div id="hyperdrive"> <div id="hyperdrive">
<div id="menu"> <div id="menu">
<button><img src="/images/file_img.png" height="50px"></button>
</div> </div>
<div id="drive"> <div id="drive">
<button><img src="/images/folder_img.png" height="50px"></button>
</div> </div>
<div id="info"> <div id="info">
<button><img src="/images/file_img.png" height="50px"></button>
</div> </div>
</div> </div>
</body> </body>
......
* {
margin: 2.5px;
padding: 2px;
}
button {
border: none;
}
button:hover {
background-color: grey;
}
#menu {
border: solid grey 2px;
width: 33%;
}
#drive {
border: solid grey 2px;
width: 33%;
}
#info {
border: solid grey 2px;
width: 33%;
}
\ No newline at end of file
const express = require('express'); const express = require('express');
//const mysql = require('mysql'); const sql = require('./modules/sql-request');
const app = express(); const app = express();
const port = 3000; const port = 8080;
app.get('/', (req, res) => { app.get('/', (req, res) => {
res.send('../front/index.html'); res.sendFile(__dirname + '/front/index.html');
}); });
/* Login /* Login
...@@ -50,6 +51,10 @@ app.get('/download/:file_id', (req, res) => { ...@@ -50,6 +51,10 @@ app.get('/download/:file_id', (req, res) => {
res.send(`Request for a download (${req.params['file_id']})`) res.send(`Request for a download (${req.params['file_id']})`)
}) })
/**
* This function return the content of a new path
* param
*/
app.get('/change-path*', (req, res) => { app.get('/change-path*', (req, res) => {
res.send(`Request for a change path (${req.params['0']})`) res.send(`Request for a change path (${req.params['0']})`)
}) })
...@@ -58,4 +63,5 @@ app.get('/create-path*', (req, res) => { ...@@ -58,4 +63,5 @@ app.get('/create-path*', (req, res) => {
res.send(`Request for a create path (${req.params['0']})`) res.send(`Request for a create path (${req.params['0']})`)
}) })
app.listen(port, () => console.log(`Example app listening on port ${port}!`)) app.use(express.static('front'));
app.listen(port, () => console.log(`Hyperdrive listening on port ${port}!`))
const mysql = require('mysql');
function getCool(){
console.log("coucou");
}
exports
\ No newline at end of file
File moved
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"_args": [ "_args": [
[ [
"accepts@1.3.7", "accepts@1.3.7",
"/Users/klaus/Documents/Web/Back/2019_tp2/projet/back" "/Users/klaus/Documents/Web/Back/2019_tp2/projet"
] ]
], ],
"_from": "accepts@1.3.7", "_from": "accepts@1.3.7",
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
], ],
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"_spec": "1.3.7", "_spec": "1.3.7",
"_where": "/Users/klaus/Documents/Web/Back/2019_tp2/projet/back", "_where": "/Users/klaus/Documents/Web/Back/2019_tp2/projet",
"bugs": { "bugs": {
"url": "https://github.com/jshttp/accepts/issues" "url": "https://github.com/jshttp/accepts/issues"
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"_args": [ "_args": [
[ [
"array-flatten@1.1.1", "array-flatten@1.1.1",
"/Users/klaus/Documents/Web/Back/2019_tp2/projet/back" "/Users/klaus/Documents/Web/Back/2019_tp2/projet"
] ]
], ],
"_from": "array-flatten@1.1.1", "_from": "array-flatten@1.1.1",
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
], ],
"_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"_spec": "1.1.1", "_spec": "1.1.1",
"_where": "/Users/klaus/Documents/Web/Back/2019_tp2/projet/back", "_where": "/Users/klaus/Documents/Web/Back/2019_tp2/projet",
"author": { "author": {
"name": "Blake Embrey", "name": "Blake Embrey",
"email": "hello@blakeembrey.com", "email": "hello@blakeembrey.com",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment