/nodeapp-news

Primary LanguageJavaScript

Node News App

A simple Node JS app with GraphQL and React JS

alt text

Requirements

  1. Docker: https://www.docker.com/
  2. Docker Compose: https://docs.docker.com/compose/
  3. NodeJS: https://nodejs.org/en/
  4. Yarn: https://yarnpkg.com/

Development

  1. Copy default settings
cp .env.example .env
  1. Run docker containers
docker-compose up -d
  1. Install dependencies
yarn
  1. Run Application
yarn dev
  1. Run the app
http://localhost:3000

Graphql

See graphql interface by going to http://localhost:3000/graphql

Query

query getNews {
  news {
    id
    title
    link
    snippet
    date
  }
}

Tests

Test can be found in tests/resolvers. Run test by using the following command:

yarn test