Skip to content

Commit

Permalink
feature(signup/register): Signup/Register feature
Browse files Browse the repository at this point in the history
- create integration tests to test the signup endpoint

- edit the models to add password and isVerified fields

- create validators for signup request body

- create helpers/utils for hashPassord, generate JWT token, verifyEmail and verifyUsername

- create signupController and export to routes

- create midllewares for checkSignup for the req.body, verifyEmail, verifyUsername, confirmPassword

- create routes for 'api/v1/register/' with the aforementioned middlewares and signupController

- change node version in Dockerfile from node:11-alpine to node:11 due to bcrypt crash

[Finishes #168781675]
  • Loading branch information
nignanthomas committed Oct 10, 2019
1 parent 2f278ba commit 6f46103
Show file tree
Hide file tree
Showing 25 changed files with 984 additions and 407 deletions.
6 changes: 5 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"presets":["@babel/preset-env"],
"plugins": ["@babel/plugin-proposal-class-properties"]
"plugins": ["@babel/plugin-proposal-class-properties", ["@babel/plugin-transform-runtime",
{
"regenerator": true
}
]]
}
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ DATABASE_PORT=

# APPLICATION

APPLICATION_PORT=
APPLICATION_PORT=

#JWT TOKEN
JWT_SECRET=supersecretjwtkey
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:11-alpine
FROM node:11

RUN mkdir -p /usr/src/app

Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
Barefoot Nomad - Making company travel and accomodation easy and convinient.
=======

## Vision
## Vision :telescope:
Make company global travel and accommodation easy and convenient for the strong workforce of savvy members of staff, by leveraging the modern web.

---

## Documentation
## Documentation :book:

For API documentation, please visit https://caret-bn-backend.herokuapp.com//api/v1/api-docs/

# Setting Up The Application
## Setting Up The Application :wrench:

## A. Docker
### A. Docker

1. Install Docker on your local machine by following [these](https://docs.docker.com/install/) instructions.

Expand Down Expand Up @@ -82,3 +82,17 @@ APPLICATION_PORT=port_your_application_will_run_on

12. To run a production version of the application, set up environment variables and execute the command ` docker-compose -f docker-compose.yml -f docker-compose.prod.yml up `

## API Endpoints :droplet:

- #### Sign up endpoint
| Endpoint | Request Method | Request parameter |
| ---------- |----------- | ------------- |
| [/api/v1/users/register](https://caret-bn-backend.herokuapp.com//api/v1/users/register) | POST | { "email": "krinkunyf@gmail.com", "username": "KrinkYF", "password": "Kun376$$#$", "confirmPassword": "Kun376$$#$" } |


# Bugs :bug:
No known bugs.
If you spot one, let us know

# Author :computer:
[Andela Rwanda's](https://www.andela.com) Team ^CARET
Loading

0 comments on commit 6f46103

Please sign in to comment.