forked from HackYourFuture/Node.js
-
Notifications
You must be signed in to change notification settings - Fork 40
Ivy wk1 hm wrk #1
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
chichiglacierz
wants to merge
2
commits into
foocoding:master
Choose a base branch
from
chichiglacierz:ivyWk1-hmWrk
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| module.exports = { | ||
| "env": { | ||
| "browser": true, | ||
| "es6": true | ||
| }, | ||
| "extends": "eslint:recommended", | ||
| "globals": { | ||
| "Atomics": "readonly", | ||
| "SharedArrayBuffer": "readonly" | ||
| }, | ||
| "parserOptions": { | ||
| "ecmaVersion": 2018, | ||
| "sourceType": "module" | ||
| }, | ||
| "rules": { | ||
| } | ||
| }; |
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,16 @@ | ||
| { | ||
| "env": { | ||
| "browser": true, | ||
| "commonjs": true, | ||
| "es6": true | ||
| }, | ||
| "extends": "standard", | ||
| "globals": { | ||
| "Atomics": "readonly", | ||
|
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. You are not using the variables declared here in the |
||
| "SharedArrayBuffer": "readonly" | ||
| }, | ||
| "parserOptions": { | ||
| "ecmaVersion": 2018 | ||
| }, | ||
| "rules": {} | ||
| } | ||
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,54 @@ | ||
| // //the following has been imported from https://date-fns.org/ and import with const | ||
|
|
||
| // const { format, formatDistance, formatRelative, subDays } from 'date-fns' | ||
|
|
||
| // function hello() { | ||
| // const now= new Date() | ||
| // format(now(), "'Today is a' iiii") | ||
| // //=> "Today is a Sunday" | ||
|
|
||
| // formatDistance(subDays(new Date(), 3), now()) | ||
| // //=> "3 days ago" | ||
|
|
||
| // formatRelative(subDays(new Date(), 3), now()) | ||
| // //=> "last Friday at 7:26 p.m." | ||
| // console.log('Hello World'); | ||
| // } | ||
| // hello() | ||
|
|
||
| //creating a server: | ||
| var http = require('http'); // | ||
|
|
||
| //create a server object: | ||
| function createServer() { | ||
| const server = http.createServer(function(req, res) { | ||
| //creates a function called http that has a response and request parameter | ||
| res.write('Hello World!'); //write a response to the client | ||
| res.end(); //end the response | ||
| }); | ||
| server.listen(8080); //the server object listens on port 8080. Once the server is created, is says: listen to port 8080 | ||
|
|
||
| console.log('service started on http://localhost:8080'); | ||
| } | ||
| createServer(); | ||
|
|
||
| //******************* | ||
| //creating a json | ||
|
|
||
| // function createServer() { | ||
| // const server = http.createServer(function (req, res) { | ||
| // if (req.url == "/hello"{ | ||
| // res.writeHead(200, { "Content-Type": "application/json" }); | ||
| // res.write(JSON.stringify({ greeting: "Hello World!" })); //write a response to the client | ||
| // res.end(); //end the response | ||
| // }else { | ||
| // res.writeHead(404, { "Content-Type": "application/json" }); | ||
| // res.write(JSON.stringify({ error: "Error" })); //write a response to the client | ||
| // } | ||
| // res.end(); //end the response | ||
| // }) | ||
| // server.listen(8080); //the server object listens | ||
|
|
||
| // //console.log('service started on http://localhost:8080'); | ||
| // } | ||
| // createServer(); |
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.
it seems like you have 2
.eslintrc.json, one is enough. You can have several eslint configuratons files if you want for example the project to follow some rules, but maybe tests should follow different rules.