Skip to content

RESTful API that would allow an application to manage users and articles

License

Notifications You must be signed in to change notification settings

canofm/workast-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workast Challenge

Project information

Create a RESTful API that would allow an application to manage users and articles.

Author

Pre-requisites

Before running this application, you should need the following programs installed:

Also, as optional I would recommend to install yarn (dependency manager) but you could use npm as well, which is installed with nodejs.

How to run?

  1. Install dependencies by running the following command in your trusted command-line:bash
yarn

or

npm install
  1. To start the server:
    Before starting the server, you probably would like to set some env variables such as SECRET_KEY or PORT.
    Due to this API only has one authentication method, you must define the SECRET_KEY in order to communicate with the application.
    By default if SECRET_KEY is not defined, then the key is "aToken", please set up a SECRET_KEY as env variable.
    In order to set env variables, you should create an .env file at root of the project. Take as as example .sample.env.
yarn start

or

npm run start

Where is the documentation?

After starting the server you could access to the documentation by hitting: http://localhost:3000/api/v0/api-docs/

This endpoint does not need authentication.
Note: 3000 is the port where the application is running but this could be change by env variable (process.env.PORT).

How to run tests?

After completing step #1:

yarn test

or

npm run test
Coverage
yarn test:coverage

or

npm run test:coverage

After running this command, you could see the coverage HTML generated in the folder "coverage" at root level of the project.

About

RESTful API that would allow an application to manage users and articles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published