- Fork/Clone/Download
- Install dependencies -
npm install
- Check the value for
apiUrl
insrc/environments/environment.prod.ts
andsrc/environments/environment.ts
(depending on prod / dev environment and probably adjust it - Run the development server -
npm start
You will need to also spin up a back-end with the following routes:
URL | HTTP Verb | Action | Request Data | Response Data |
---|---|---|---|---|
http://localhost:8080/register | POST | Register a new user | ||
http://localhost:8080/login | POST | Log a user in | { email: string, password: string } | { expires: number, token: string, user: { email: string }} |
http://localhost:8080/api/v1/example | GET | Get some example data | some JSON object |
The returned token expiration will be checked against the current date. If the token is already expired, the backend should return an error.
For trying out you can use the This example backend.