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

New hierarchy

parent d3230dad
No related branches found
No related tags found
No related merge requests found
Showing
with 44 additions and 17 deletions
......@@ -3,8 +3,14 @@ const express = require('express');
const app = express();
const port = 3000;
app.get('/', (req, res) => res.send('Welcome to our super project !'))
app.get('/', (req, res) => {
res.send('../front/index.html');
});
/* Login
* param : pseudo
* param : password
*/
app.get('/login', (req, res) => {
res.send(`Request for a login (${req.query['login']}, ${req.query['pass']})`)
})
......@@ -13,14 +19,29 @@ app.get('/logout/', (req, res) => {
res.send(`Request for a logout`)
})
/**
* Request register
* param : pseudo
* param : password
*/
app.get('/register/', (req, res) => {
res.send(`Request for a register (${req.query['login']}, ${req.query['pass']})`)
})
/**
* Request to share a file with a user
* param : file_id
* param : user1
* param : user2
* user1 share a file_id with user2
*/
app.get('/share/:file_id', (req, res) => {
res.send(`Request for a file sharing (id: ${req.params['file_id']})`)
})
/**
* Request to upload a file
*/
app.get('/upload/', (req, res) => {
res.send(`Request for an upload (${req.query['file']})`)
})
......
File moved
{
"_from": "accepts@~1.3.7",
"_args": [
[
"accepts@1.3.7",
"/Users/klaus/Documents/Web/Back/2019_tp2/projet/back"
]
],
"_from": "accepts@1.3.7",
"_id": "accepts@1.3.7",
"_inBundle": false,
"_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"_location": "/accepts",
"_phantomChildren": {},
"_requested": {
"type": "range",
"type": "version",
"registry": true,
"raw": "accepts@~1.3.7",
"raw": "accepts@1.3.7",
"name": "accepts",
"escapedName": "accepts",
"rawSpec": "~1.3.7",
"rawSpec": "1.3.7",
"saveSpec": null,
"fetchSpec": "~1.3.7"
"fetchSpec": "1.3.7"
},
"_requiredBy": [
"/express"
],
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd",
"_spec": "accepts@~1.3.7",
"_where": "/Users/klaus/Documents/Web/Back/2019_tp2/projet/node_modules/express",
"_spec": "1.3.7",
"_where": "/Users/klaus/Documents/Web/Back/2019_tp2/projet/back",
"bugs": {
"url": "https://github.com/jshttp/accepts/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Douglas Christopher Wilson",
......@@ -41,7 +45,6 @@
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
},
"deprecated": false,
"description": "Higher-level content negotiation",
"devDependencies": {
"deep-equal": "1.0.1",
......
{
"_args": [
[
"array-flatten@1.1.1",
"/Users/klaus/Documents/Web/Back/2019_tp2/projet/back"
]
],
"_from": "array-flatten@1.1.1",
"_id": "array-flatten@1.1.1",
"_inBundle": false,
......@@ -19,9 +25,8 @@
"/express"
],
"_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2",
"_spec": "array-flatten@1.1.1",
"_where": "/Users/klaus/Documents/Web/Back/2019_tp2/projet/node_modules/express",
"_spec": "1.1.1",
"_where": "/Users/klaus/Documents/Web/Back/2019_tp2/projet/back",
"author": {
"name": "Blake Embrey",
"email": "hello@blakeembrey.com",
......@@ -30,8 +35,6 @@
"bugs": {
"url": "https://github.com/blakeembrey/array-flatten/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Flatten an array of nested arrays into a single flat array",
"devDependencies": {
"istanbul": "^0.3.13",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment