Skip to content

Commit

Permalink
Merge pull request #64 from scrum-gang/development
Browse files Browse the repository at this point in the history
Sprint 2 Release
  • Loading branch information
alexH2456 authored Mar 25, 2019
2 parents fb984ef + 91c396e commit 7daa69e
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 49 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/*.html
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ cache:
- "node_modules"
script:
- npm test
- npm run staging
- if [ "$TRAVIS_BRANCH" == "master" ] || [ "$TRAVIS_BRANCH" == "development" ] ; then
npm run staging;
fi
after_success: npm run coverage
deploy:
provider: heroku
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Authentication - Jobhub

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f193348b2004466ba69f53bec6f9de9a)](https://www.codacy.com/app/alexH2456/authentication?utm_source=github.com&utm_medium=referral&utm_content=scrum-gang/authentication&utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.com/scrum-gang/authentication.svg?branch=master)](https://travis-ci.com/scrum-gang/authentication)
[![Coverage Status](https://coveralls.io/repos/github/scrum-gang/authentication/badge.svg?branch=master)](https://coveralls.io/github/scrum-gang/authentication?branch=master)

Expand Down
10 changes: 10 additions & 0 deletions doc/login.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ Returns session token for existing User on succesful login.

```json
{
"user": {
"_id": "[user ID]",
"email": "[email]",
"password": "[hashed password]",
"type": "[user type]",
"verified": true,
"created_at": "[account creation date]",
"updated_at": "[last account update]",
"__v": 0
},
"iat": "[Token issued at]",
"exp": "[Token expiry]",
"token": "[JWT token]"
Expand Down
5 changes: 4 additions & 1 deletion doc/selfGet.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ Returns corresponding user given JWT token.
"email": "[User email]",
"password": "[User password]",
"type": "[User type]",
"verified": true
"verified": true,
"created_at": "[account creation date]",
"updated_at": "[last account update]",
"__v": 0
}
```

Expand Down
Binary file added favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "node src/index.js",
"dev": "nodemon src/index.js",
"test": "npm run lint && npm run mocha",
"lint": "eslint src/** test/**",
"lint": "eslint .",
"mocha": "cross-env NODE_ENV=test nyc --reporter=text mocha --recursive --timeout 10000 --exit",
"staging": "cross-env NODE_ENV=staging-test mocha --recursive --timeout 10000 --exit",
"coverage": "nyc report --reporter=text-lcov | coveralls"
Expand Down
1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
ENV: process.env.NODE_ENV || "development",
PORT: process.env.PORT || 3000,
URL: process.env.BASE_URL || "http://localhost:3000",
FRONTEND_URL: process.env.FRONTEND_URL || "https://jobhub.netlify.com",
MONGODB_URI: process.env.MONGODB_URI,
MONGODB_URI_STAGING: process.env.MONGODB_URI_STAGING,
JWT_SECRET: process.env.JWT_SECRET || "secret",
Expand Down
20 changes: 20 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html lang='en-US'>
<head>
<meta charset='UTF-8'>
<title>JobHub Authentication</title>
<style type='text/css'>
h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 100%;
}
p {
font-family: Arial, Helvetica, sans-serif;
font-size: 100%;
}
</style>
</head>
<body>
<h1>👮 Welcome to the Jo🅱️hu🅱️ Authentication Microservice 👮</h1>
<p>Please consult our <a href='https://github.com/scrum-gang/authentication'>repo</a> for endpoint information.</p>
</body>
</html>
Loading

0 comments on commit 7daa69e

Please sign in to comment.