-
Notifications
You must be signed in to change notification settings - Fork 0
Lab7 #8
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
Open
aadereiko
wants to merge
22
commits into
master
Choose a base branch
from
lab7
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Lab7 #8
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c190b33
added files
aadereiko 803187c
There are in folders pictures with comments
aadereiko 5019812
new mockup
aadereiko 79df154
my main page
aadereiko dbfda48
changed index and styles
aadereiko 1d315b3
new Adapted css
aadereiko 56c54ef
changed footer
aadereiko 2e6020d
changed footer2
aadereiko 157c0b4
added js file
aadereiko 59a21d7
changed footer and js-code
aadereiko c94ade0
changed data on date
aadereiko 5d86c8b
changed comments
aadereiko 0ca2dbd
5 lab: DOM
aadereiko e363d28
changes DOM and JS
aadereiko e345c93
changed comments
aadereiko 60b9adb
lab 6
aadereiko 0e41bbf
lab7, changed comments lab6
aadereiko b0ed807
change place of files
aadereiko 623ea1b
changed place
aadereiko c648db2
deleted folder
aadereiko f5923e2
changes with localhost
aadereiko 5280337
lab 7 changes
aadereiko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| *.iml | ||
| .DS_Store/ | ||
| .idea/ | ||
| out/ | ||
| out/ | ||
| node_modules/ |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| var http = require('http'); | ||
| var fs = require('fs'); | ||
| var path = require('path'); | ||
|
|
||
| http.createServer(function (request, response) { | ||
| console.log('request starting...'); | ||
|
|
||
| var filePath = '.' + request.url; | ||
| if (filePath == './') | ||
| filePath = './index.html'; | ||
|
|
||
| var extname = path.extname(filePath); | ||
| var contentType = 'text/html'; | ||
| switch (extname) { | ||
| case '.js': | ||
| contentType = 'text/javascript'; | ||
| break; | ||
| case '.css': | ||
| contentType = 'text/css'; | ||
| break; | ||
| case '.json': | ||
| contentType = 'application/json'; | ||
| break; | ||
| case '.png': | ||
| contentType = 'image/png'; | ||
| break; | ||
| case '.jpg': | ||
| contentType = 'image/jpg'; | ||
| break; | ||
| case '.wav': | ||
| contentType = 'audio/wav'; | ||
| break; | ||
| } | ||
|
|
||
| fs.readFile(filePath, function(error, content) { | ||
|
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. Ой малайца! |
||
| if (error) { | ||
| if(error.code == 'ENOENT'){ | ||
| fs.readFile('./404.html', function(error, content) { | ||
| response.writeHead(200, { 'Content-Type': contentType }); | ||
| response.end(content, 'utf-8'); | ||
| }); | ||
| } | ||
| else { | ||
| response.writeHead(500); | ||
| response.end('Sorry, check with the site admin for error: '+error.code+' ..\n'); | ||
| response.end(); | ||
| } | ||
| } | ||
| else { | ||
| response.writeHead(200, { 'Content-Type': contentType }); | ||
| response.end(content, 'utf-8'); | ||
| } | ||
| }); | ||
|
|
||
| }).listen(3000); | ||
| console.log('Server running'); | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
В отдельную функцию ( бал не снижаю )