Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Phone book#23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Phone book #23
Changes from all commits
c8a4158c89689d076094123f855662e73533ab6d6ed22bbbe73d31a3d0d6f077b18c4bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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> --> | ||
| <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> --> | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| 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) =>{ | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe 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}`) | ||
| }) | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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