-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayerTest.js
More file actions
26 lines (19 loc) · 774 Bytes
/
Copy pathlayerTest.js
File metadata and controls
26 lines (19 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'use strict';
const Datastorage = require('./storage/dataStorageLayer');
const storage=new Datastorage();
storage.getAll().then(console.log).catch(console.log);
// storage.get(1).then(console.log).catch(console.log);
// storage.get(2).then(console.log).catch(console.log);
// storage.get(10).then(console.log).catch(console.log);
// storage.get().then(console.log).catch(console.log);
const newComp={
id:100,
name:"Beast IX",
type:"server",
processor:"selenium",
amount:10
}
storage.insert(newComp).then(console.log).catch(console.log);
//storage.remove(100).then(console.log).catch(console.log);
//storage.getAll().then(console.log).catch(console.log);
//storage.update(100,newComp).then(console.log).catch(console.log)