-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b55f3c1
commit 9654922
Showing
5 changed files
with
145 additions
and
88 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
*.swo | ||
*~ | ||
*.log | ||
node_modules | ||
node_modules |
This file contains 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,61 @@ | ||
# :eight_spoked_asterisk: :stars: :sparkles: :dizzy: :star2: :star2: :sparkles: :dizzy: :star2: :star2: Contributing :star: :star2: :dizzy: :sparkles: :star: :star2: :dizzy: :sparkles: :stars: :eight_spoked_asterisk: | ||
|
||
So, you want to contribute to this project! That's awesome. However, before | ||
doing so, please read the following simple steps how to contribute. This will | ||
make the life easier and will avoid wasting time on things which are not | ||
requested. :sparkles: | ||
|
||
## Discuss the changes before doing them | ||
- First of all, open an issue in the repository, using the [bug tracker][1] | ||
describing the contribution you'd like to make, the bug you found or any | ||
other ideas you have. This will help us to get you started on the right | ||
foot. | ||
|
||
- If it makes sense, add the platform and software information (e.g. operating | ||
system, Node.JS version etc), screenshots (so we can see what you're seeing). | ||
|
||
- It's recommended to wait for feedback before continuing to next steps. However, | ||
if the issue is clear (e.g. a typo) and the fix is simple, you can continue | ||
and fix it. | ||
|
||
## Fixing issues | ||
- Fork the project in your account and create a branch with your fix: | ||
`some-great-feature` or `some-issue-fix`. | ||
|
||
- Commit your changes in that branch, writing the code following the | ||
[code style][2]. If the project contains tests (generally, the `test` | ||
directory), you are encouraged to add a test as well. :memo: | ||
|
||
- If the project contains a `package.json` file add yourself in the | ||
`contributors` array (if it doesn't exist, create it): | ||
|
||
```json | ||
{ | ||
"contributors": [ | ||
"Your Name <and@email.address> (http://your.website) | ||
] | ||
} | ||
``` | ||
|
||
## Creating a pull request | ||
|
||
- Open a pull request, and reference the initial issue in the pull request | ||
message (e.g. *fixes #<your-issue-number*). Write a good description and | ||
title, so everybody will know what is fixed/improved. | ||
|
||
- If it makes sense, add screenshots, gifs etc, so it's easier to see what's | ||
going on. | ||
|
||
## Wait for feedback | ||
Before accepting your contributions, we will review them. You may get feedback | ||
about what should be fixed in your modified code. If so, just keep committing | ||
in your branch and the pull request will be updated automatically. | ||
|
||
## Everyone is happy! | ||
Finally, your contributions will be merged, and everyone will be happy! :smile: | ||
|
||
Thanks! :sweat_smile: | ||
|
||
[1]: https://github.com/IonicaBizau/node-jsonrequest/issues | ||
|
||
[2]: https://github.com/IonicaBizau/code-style |
This file contains 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,21 +1,24 @@ | ||
The MIT License (MIT) | ||
The KINDLY License | ||
Copyright (c) 2015 Ionică Bizău <bizauionica@gmail.com> | ||
|
||
Copyright (c) 2014-15 Ionică Bizău | ||
You have the permission to use this software, read its source code, modify and | ||
redistribute it under the following terms: | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
- if you want to use this software or include parts of its code in a | ||
closed-source or commercial project you should kindly ask the | ||
author (via a private message or email) and get a positive answer | ||
- this license should be included in the modified versions of this software | ||
- in case of redistributing modified copies, you are encouraged to clearly | ||
indicate that the copies are based on this work | ||
- if you think that your redistributed copy is awesome, you are encouraged to | ||
show the author of this software what you did and how you helped the others | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
You are free to install and use this software on as many machines as you want, | ||
free of charge, making sure you met the terms above. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
You are encouraged to kindly support the software and its author by: | ||
|
||
- sharing his/her work | ||
- reporting issues/bugs and asking for feature requests | ||
- donating money or any other things that can help the author | ||
- contribute on the software code by fixing bugs and adding features |
This file contains 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
This file contains 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,41 +1,17 @@ | ||
// Dependencies | ||
var JsonRequest = require("../lib") | ||
, Lien = require("lien") | ||
; | ||
var JsonRequest = require("../lib"); | ||
|
||
// Init lien server | ||
var server = new Lien({ | ||
host: "localhost" | ||
, port: 9000 | ||
}); | ||
|
||
// Handle "/" | ||
server.page.add(/^\/$/, function (lien) { | ||
lien.end({ | ||
Hello: "World" | ||
}); | ||
}) | ||
|
||
// Handle "/hello" | ||
server.page.add(/^\/hello$/, function (lien) { | ||
lien.end({ | ||
method: lien.method | ||
, data: lien.data | ||
}); | ||
}); | ||
|
||
server.on("load", function (err) { | ||
if (err) { throw err; } | ||
JsonRequest("http://localhost:9000/", function (err, data) { | ||
console.log(err || data); | ||
JsonRequest("http://localhost:9000/hello", { | ||
"some": "data" | ||
}, function (err, data) { | ||
console.log(err || data); | ||
JsonRequest("https://status.github.com/api.json", function (err, data) { | ||
console.log(err || data); | ||
process.exit(0); | ||
}) | ||
}); | ||
}); | ||
// Make a request to GitHub API | ||
JsonRequest("https://api.github.com/users/IonicaBizau", function (err, data) { | ||
console.log(err || data); | ||
}); | ||
// => { | ||
// "login": "IonicaBizau", | ||
// "id": 2864371, | ||
// "avatar_url": "https://avatars.githubusercontent.com/u/2864371?v=3", | ||
// "gravatar_id": "", | ||
// "url": "https://api.github.com/users/IonicaBizau", | ||
// "html_url": "https://github.com/IonicaBizau", | ||
// "followers_url": "https://api.github.com/users/IonicaBizau/followers", | ||
// ... | ||
// } |