Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PurpleTechnologies_test

Test task by Purpule Technologies:

##Overview You should create a simple REST API in Node.js. Below you can find several specific tasks. To be successful you don't have to finish them all. Invest reasonable time depending on your free time and don't worry if you can't finish it all. Focus on quality of your code not on quantity of tasks. Make it readable, expandable and production ready. Make sure you deal with possible errors etc.

Feel free to ask any questions. Write down any significant problems you had. Let us know how you solved them or how would you tackle them if you had more time.

##Tasks As mentioned above, you don't have to accomplish them all. For example if you think that understanding the basics of CoffeeScript would take you too much time and compromise the quality of your work, skip this and use plain JS instead.

  1. Use CoffeeScript
  2. Use Hapi.js framework
  3. Create a route /exchange-rates/{base-currency} that returns the current exchange rate between the base currency and other currencies of the list: EUR, USD, GBP, CZK, JPY
  4. Use Joi module to validate request and response

##Bonus tasks you want to play a bit more

  1. Create a database of clients and their orders. You can use fixtures instead of an actual DB
  2. Create route that will return all orders of a given customer. Customer is identified by e-mail.
  3. Create a login route and a user DB
  4. Make sure user can get only his orders, not orders of someone else
  5. Create an admin user, that can get orders of any client

And again, always focus on quality and make the code as production ready as possible.


#Solution:

Please start by executing the following commands to build the project, under each folder (principal_tasks and additional_tasks)

npm install

grunt

NPM was sued as a package manager and for automated workflow and stack I used GruntJS

The source Code exists under src/server.coffee for the first part of the project

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages