sandangel / zt-code-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unsplash Coding Challenge

Quickstart

  1. Download and install Docker Desktop
  2. Clone this repository and place your Unsplash access key in a file named .env at the repository root.
    $ git clone https://github.com/mattcarpenter/zt-code-challenge.git
    $ cd zt-code-challenge
    $ echo UNSPLASH_ACCESS_KEY=<your access key> > .env
  3. Build and run the application
    $ docker-compose build && docker-compose up

The image search application will be available at http://localhost:4900.

See Developer Getting Started for more information on running and testing the front-end and back-end components of this application.

Code Challenge Discussion Topics

Please see CODE_CHALLENGE_DISCUSSION.md for todos and responses to the rational questions.

Developer Getting Started

The following instructions assume you are running in a Unix environment. have Node.JS installed, and placed your Unsplash Access Key in a file called .env in the root of repository.

Running without Docker

  1. Start the backend express server
    $ cd backend
    $ npm install
    $ npm start
  2. Start the frontend dev server
    $ cd ../frontend/
    $ npm install
    $ npm start

Backend http://localhost:4900/api/search?query=kittens

Frontend: http://localhost:3000/

Note: The dev server is configured to proxy requests to the backend e.g: http://localhost:3000/api/search?query=kittens

Testing

Test sources are colocated with the components and other sources under test.

Frontend

$ cd frontend/
$ npm test

Backend

$ cd backend/
$ npm test

About


Languages

Language:JavaScript 95.4%Language:HTML 3.2%Language:Dockerfile 0.9%Language:CSS 0.6%