This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Route : '/api/delete/:bookid` | |
* Description : "Will be data data using bookid" | |
*/ | |
app.delete('/api/delete/:bookid', (req, res) => { | |
const id = req.params.bookid | |
delete data.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Route : '/api/update/:bookid` | |
* Description : "Will be updating data using bookid" | |
*/ | |
app.post('/api/update/:bookid', (req, res) => { | |
const id = req.params.bookid | |
const {name, author, pages, price} = req.body | |
data[id] = {id, name, author, pages, price} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Route : '/api/:bookid` | |
* Description : "Will be fetching data using bookid" | |
*/ | |
app.get('/api/:bookid', (req, res) => { | |
const id = req.params.bookid | |
res.json(data[id]) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Route : '/api/add` | |
* Description : "Will be adding the book to our database" | |
*/ | |
app.post('/api/add', (req, res) => { | |
// destruturing the variables, saves times always | |
const {id, name, author, pages, price} = req.body | |
// storing the data in the database (here to the variable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const bodyParser = require('body-parser') | |
const data = require('./data') | |
const app = express() | |
// Will allow data from ajax in req.body variable | |
app.use(bodyParser.json()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const bodyParser = require('body-parser') | |
const data = require('./data') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const data = {} | |
module.exports = data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Worker information | |
0.13s0.01s0.00s0.01s | |
system_info | |
Build system information | |
0.00s0.00s0.02s0.00s0.01s0.29s0.00s0.00s0.00s0.01s0.00s0.10s0.01s0.72s0.00s0.00s6.03s0.00s2.42s0.00s | |
remote: Total 1020 (delta 601), reused 847 (delta 435), pack-reused 0 | |
Receiving objects: 100% (1020/1020) Receiving objects: 100% (1020/1020), 2.86 MiB | 8.09 MiB/s, done. | |
Resolving deltas: 100% (601/601), done. | |
$ cd sudipt1999/hydra-python-agent-gui | |
$ git checkout -qf ff12d52f8da23a5f680a2d7c3d771a4da5cff5a4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(venv) sudipt@sudo-dev:~/Desktop/hydra-python-agent$ python setup.py install | |
Traceback (most recent call last): | |
File "setup.py", line 8, in <module> | |
from pip._internal.download import PipSession | |
ModuleNotFoundError: No module named 'pip._internal.download' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "setup.py", line 10, in <module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(venv) sudipt@sudo-dev:~/Desktop/hydra-python-agent$ python setup.py install | |
Traceback (most recent call last): | |
File "setup.py", line 8, in <module> | |
from pip._internal.download import PipSession | |
ModuleNotFoundError: No module named 'pip._internal.download' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "setup.py", line 10, in <module> |
NewerOlder