Skip to content

imran517/express-js-graphql-sqlite-api

Repository files navigation

express-js-graphql-sqlite-api

A simple api using express.js and sqlite with async/await

Requirements

Diagram

Alt text

Components

  • config (config.js)

    • configuration file
  • server (server.js)

    • creates server and listens on a port 3000
    • defines resolver (resolver.js)
  • Controller (taskController.js)

    • handles requests
  • Service (taskService.js)

    • handles business logic
  • Schema (taskSchema.js)

    • defines schema for Task, Query (getall, getone) and Mutation (add, update, delete)
  • dbContext (dbContext.js)

    • handles db connection
  • database (sqlite)

    • sqlite database

Run

Run the following command from the root directory:

node .\server.js

Tests

Try the following urls in Postman.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages