- NodeJS Environment
- MongoDB Docker instance
- Docker
$ git clone [email protected]:temi-f/miniwall.git
npm install express mongoose nodemon body-parser dotenv
npm install joi
npm install bcryptjs
npm install jsonwebtoken
$ docker image build -t miniwall-app-image:1 .
$ docker container run -d --name miniwall-app --publish 80:3000 miniwall-app-image:1
`http://localhost:80/`
The MiniWall API can be tested manually and interacted with using this .
In order to interact with the MiniWall API, a user must meet the following prerequisite:
- Have a registered account
- Have an authication token which must be used with each API request
- A user account can be registered by making a POST request to the following endpoint:
`http://localhost:80/api/user/registration`
- The Payload must be a JSON payload containing
user_name
,email
andpassword
. For example:See screenshot below:{ "user_name": "john.snow", "email": "[email protected]", "password": "drowssap" }
- A registered User can obtain an authentication token by making a POST request to the following endpoint:
`http://localhost:80/api/user/auth`
- The Payload must be a JSON payload containing
email
andpassword
. For example:{ "email": "[email protected]", "password": "drowssap" }
-
Once an
authentication token
has been obtained (see above step), requests to the MiniWall API must include theToken
in order to make a successful API request. -
The
authentication token
must be copied and added to the HTTP client Headers as a parameter named asauth-token
. Theauth-token
value must be contructed in the format below:`Bearer <TOKEN_VALUE_OBTAINED_FROM_USER_AUTHENTICATION_STEP_ABOVE>`
The List of API requests available can found in the . Generally, the format is as below:
`http://localhost:80/{API_RESOURCE_ROUTE}`