Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions phone-book/add-user.html

This file was deleted.

20 changes: 0 additions & 20 deletions phone-book/edit-contact.html

This file was deleted.

10 changes: 9 additions & 1 deletion phone-book/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@
</head>

<body>
<div class="container-holder"></div>
<div id="app"></div>

<script src="src/users.js"></script>
<script src="src/router.js"></script>
<script src="src/server-api.js"></script>
<!-- <script src="src/contacts.js"></script> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's seems like an a duplication with line 20, please remove it

<script src="src/contacts.js"></script>
<script src="src/keypad.js"></script>
<script src="src/edit-user.js"></script>
<script src="src/user.js"></script>
<!-- <script src="src/add-user.js"></script> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what the status of that script? it's better to remove commented code. The commented code just makes discouraged the next developer who inspect such code

<script src="src/app.js"></script>
</body>
</html>
20 changes: 0 additions & 20 deletions phone-book/keypad.html

This file was deleted.

25 changes: 25 additions & 0 deletions phone-book/node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const http = require('http');
const fs = require('fs');
const port = 3000;

http.createServer( (request, response) =>{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally, you need your own server only for development purpose, so you could use some instruments like webpack-dev-server or so

let path = request.url;
if(path.indexOf('html') != -1 || path == '/'){
path = '/index.html';
}
// path = '/index.html';

let source = '';
if (fs.existsSync('.' + path)) {
source = fs.readFileSync('.' + path);
}else{
source = 'no such resource';
response.statusCode = 404;
}
response.end(source);
}).listen(port, (err) => {
if (err) {
return console.log('something bad happened', err);
}
console.log(`server is listening on ${port}`)
})
132 changes: 0 additions & 132 deletions phone-book/src/add-user.js

This file was deleted.

Loading