https://github.com/knaxus/rest-and-graphql
:zap: Highly scalable REST API codebase with GraphQL layer on its :zap:
https://github.com/knaxus/rest-and-graphql
graphql-api graphql-endpoint graphql-server javascipt javascript-applications mysql nodejs-api nodejs-development nodejs-server rest-services restful-api
Last synced: 3 months ago
JSON representation
:zap: Highly scalable REST API codebase with GraphQL layer on its :zap:
- Host: GitHub
- URL: https://github.com/knaxus/rest-and-graphql
- Owner: knaxus
- License: gpl-3.0
- Created: 2018-11-24T09:54:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T16:35:20.000Z (over 2 years ago)
- Last Synced: 2025-01-22T01:28:04.394Z (4 months ago)
- Topics: graphql-api, graphql-endpoint, graphql-server, javascipt, javascript-applications, mysql, nodejs-api, nodejs-development, nodejs-server, rest-services, restful-api
- Language: JavaScript
- Homepage: https://ashokdey.in
- Size: 1.09 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Scalable API Architecture
[](https://app.codacy.com/app/ashokdey/rest-and-graphql?utm_source=github.com&utm_medium=referral&utm_content=knaxus/rest-and-graphql&utm_campaign=Badge_Grade_Dashboard)
This repository is a demostration of highly scalable & easily maintainable codebase architecture for both **REST & GraphQL API** interface.

## Tech Stack
- Node.js
- GraphQL
- MySQL## Work Progress
- Upcoming APIs in this repo
- User Registration
- ACL
- Admin Portal
- Seller Portal
- Unit Testing
- REST endpoints
- GraphQL endpoints
- CI and CD## Run locally
- Clone the repo
- `npm install`
- Setup a `.env` file at the root of the repo
- `npm run dev`
- GraphQL endpoint will be http://localhost:PORT/graphql## Notes
- Contents of `.env` file
```env
PORT=8080
NODE_ENV = development
READ_DB_HOST = localhost
READ_DB_USER = root
READ_DB_PASSWORD = password
READ_DB_NAME = awesome_products
READ_DB_PORT = 3306
READ_DB_CONNECTION_LIMIT = 10
WRITE_DB_HOST = localhost
WRITE_DB_USER = root
WRITE_DB_PASSWORD = password
WRITE_DB_NAME = awesome_products
WRITE_DB_PORT = 3306
WRITE_DB_CONNECTION_LIMIT = 10
```- Use the `SQL` file located in `resources` folder to create the database