Skip to content

Commit

Permalink
Merge pull request #1 from tminussi/master
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
roninx991 committed Oct 1, 2018
2 parents 18c30d7 + 877a153 commit 613b60b
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -2,4 +2,6 @@ Just pick any issue in the Issues list.

Try to keep your code as clean as possible (don't push unindented, commented out code, etc)

Once you're ready to submit your first PR, edit the contributors.json file and add your name there. The e-mail is obviously optional.

Happy hacking!
27 changes: 25 additions & 2 deletions README.md
Expand Up @@ -10,7 +10,30 @@ Feel free to create a PR and help improving this project.

## How to run

- Navigate to the root of the project and run **npm install**
### Backend

If you use VisualCode, just open it and hit F5. It will start debugging at port 3000. If you don't, run **serverless offline start** from the command line and it will start a server at port 3000.
- Navigate to the **server** directory of the project and run **npm install**

If you use VisualCode, just open it and hit F5. It will start debugging at port 3000.

If you are someone who prefers the cli just run
```
$: npm run local
$: npm run local -- --port 5000 # optionally on a diffrent port
```
This also by default starts the server on port 3000, but if you prefer
to change it you can, by passing --port 3001 and also remember to update
the port address index.js in frontend client folder.



### Frontend

- Navigate to the **client** directory of the project and open the index.html file


## Contributing

Take a look into the [CONTRIBUTING.md](https://github.com/tminussi/hacktoberfest-2018-checker/blob/master/CONTRIBUTING.md) file for any questions that may arise. You're also free to update that file.

4 changes: 2 additions & 2 deletions client/index.html
Expand Up @@ -38,7 +38,7 @@
<div style="width: 400px; margin: 50px auto">
{{#prCount}}
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="max-width: {{prPercentage}}">
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="max-width: {{prPercentage}}%">
<span class="title"></span>
</div>
</div>
Expand Down Expand Up @@ -70,4 +70,4 @@
</div>
{{/prCount}}
</script>
</html>
</html>
8 changes: 8 additions & 0 deletions client/index.js
Expand Up @@ -27,6 +27,13 @@
$.when($.ready).then(() => {
const loaderWrapperEl = document.getElementById('loader-wrapper');
loaderWrapperEl.style.visibility = 'hidden';
//Keypress event for the username field
$("#username").keypress((e) => {
//check if the user presses enter
if (e.which == 13) {
$('#do-req').click();
}
});
$("#do-req").click(() => {
let username = $("#username").val();

Expand All @@ -52,6 +59,7 @@
if (prPercentage > 100) {
prPercentage = 100;
}
responseData.prPercentage = prPercentage;
loaderWrapperEl.style.visibility = 'hidden';
$("#response").html(Mustache.render(template, responseData));
counter = 0;
Expand Down
6 changes: 6 additions & 0 deletions contributors.json
@@ -0,0 +1,6 @@
{
"https://github.com/tminussi": "Thales Minussi (tminussi@gmail.com)",
"https://github.com/hovoodd": "Michael Slizenko (m.slizenko@protonmail.com)",
"https://github.com/bharatzvm": "BP",
"https://github.com/SpaceLenore": "SpaceLenore"
}
File renamed without changes.
3 changes: 2 additions & 1 deletion server/package.json
Expand Up @@ -10,7 +10,8 @@
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"local": "serverless offline start"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 613b60b

Please sign in to comment.