Skip to content

Latest commit

 

History

History
95 lines (69 loc) · 2.03 KB

README.md

File metadata and controls

95 lines (69 loc) · 2.03 KB

Lush Technical Challenge

An Apollo GraphQL server written in TypeScript.

This API utilizes the Pothos schema builder for type safety, Axios for requests, Open Meteo API for fetching weather data and country-city-state for geographical coordinates.

Additionally, it utilizes country-city-state to fetch city longitude and latitudes for ease of use.

Frontend

The frontend for this repository can be found here

graphql-weather-client

Features

Architecture

.
├── src/
│   │  
│   ├── graphql/
│   │   │ 
│   │   ├── schemas/     // pothos schemas
│   │   └── server/      // apollo server instance
│   │
│   ├── lib/             // shared 3rd party libraries
│   ├── types/           // typscript types
│   ├── utils/           // utils and helper functions
│   │  
│   └── index.ts         // entry point
│ 
├── .gitignore
├── .env.sample
├── .env
├── README.md
├── nodemon.json
└── tsconfig.json

Installation

  1. Clone the Repository:

    $ git clone https://github.com/ejkorol/graphql-weather-api && cd graphql-weather-api
  2. Install dependencies:

    $ npm install
  3. Transfer .env.sample variables into .env:

    $ touch .env && cat .env.sample > .env
  4. Spin up the dev server:

    $ npm run dev

Startup

  • Development server:

    $ npm run dev
  • Building:

    $ npm run build
  • Running compiled server:

    $ npm run start

Author: Jason Korol