Skip to content

Commit f91caa5

Browse files
committed
k
0 parents  commit f91caa5

File tree

104 files changed

+42450
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+42450
-0
lines changed

README.md

50 Bytes

beegchan

beegchan

backend/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist-server

backend/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

backend/package-lock.json

Lines changed: 7427 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "backend",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "src/index.js",
6+
"scripts": {
7+
"build": "npm-run-all clean transpile",
8+
"clean": "rimraf dist-server",
9+
"transpile": "babel ./src --out-dir dist-server",
10+
"serve": "npm run build && node ./dist-server/",
11+
"test": "npm run build && mocha ./dist/**/*.spec.js"
12+
},
13+
"author": "",
14+
"license": "ISC",
15+
"dependencies": {
16+
"@babel/cli": "^7.8.4",
17+
"@babel/core": "^7.8.7",
18+
"@babel/plugin-transform-runtime": "^7.8.3",
19+
"@babel/preset-env": "^7.8.7",
20+
"axios": "^0.19.0",
21+
"bigchaindb-driver": "^4.1.1",
22+
"body-parser": "^1.19.0",
23+
"cors": "^2.8.5",
24+
"express": "^4.17.1",
25+
"express-validator": "^6.2.0",
26+
"ipfs-api": "^26.1.2",
27+
"jsonwebtoken": "^8.5.1",
28+
"multer": "^1.4.2",
29+
"node-vault": "^0.9.13",
30+
"nodemailer": "^6.4.4",
31+
"npm-run-all": "^4.1.5",
32+
"rimraf": "^3.0.2",
33+
"uuid": "^3.3.3"
34+
},
35+
"devDependencies": {
36+
"nodemon": "^1.19.4"
37+
},
38+
"babel": {
39+
"presets": [
40+
"@babel/preset-env"
41+
],
42+
"plugins": [
43+
[
44+
"@babel/transform-runtime"
45+
]
46+
]
47+
}
48+
}

backend/src/bin/www.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import http from 'http';
2+
import app from '../App';
3+
4+
5+
const port = 5000;
6+
app.set('port', port);
7+
const server = http.createServer(app);
8+
server.listen(port);
9+
// server.on('listening', onListening);
10+
11+
// /**
12+
// * Normalize a port into a number, string, or false.
13+
// */
14+
15+
// function normalizePort(val) {
16+
// const port = parseInt(val, 10);
17+
18+
// if (isNaN(port)) {
19+
// return val;
20+
// }
21+
22+
// if (port >= 0) {
23+
// return port;
24+
// }
25+
26+
// return false;
27+
// }
28+
29+
30+
// /**
31+
// * Event listener for HTTP server "listening" event.
32+
// */
33+
34+
// function onListening() {
35+
// const addr = server.address();
36+
// const bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port;
37+
// console.log('Listening on ' + bind);
38+
// }

backend/src/configs/bigchaindb.config.json

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"400": "Bad Request",
3+
"404": "Page/Path Not Found",
4+
"401": "You are unauthorized",
5+
"500": "Oops! We've encountered an error at our end. Hold tight"
6+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"file": {
3+
"level": "info",
4+
"filename": "/logs/app.log",
5+
"handleExceptions": true,
6+
"json": true,
7+
"maxsize": 5242880,
8+
"maxFiles": 5,
9+
"colorize": false
10+
},
11+
"console": {
12+
"level": "debug",
13+
"handleExceptions": true,
14+
"json": false,
15+
"colorize": true
16+
},
17+
"misc": {
18+
"exitOnError": false
19+
}
20+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export async function test (req, res, next) {
2+
const ipfs = req.params.hash;
3+
4+
}

0 commit comments

Comments
 (0)