Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-generator-node-typescript-apollo-graphql-mongo-cli

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-generator-node-typescript-apollo-graphql-mongo-cli

Express Generator CLI for Node with Typescript, Apollo GraphQL Server and MongoDB

  • 1.0.8
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

BTC 3B2R9u6dpJyWB4U6iDWC14y9yejnF5hsSN Buy me a coffee Ko-fi

Express Generator CLI for Node with Typescript, Apollo GraphQL Server and MongoDB with Mongoose

This CLI helps to create new implemented API demo for Node with Typescript, Apollo GraphQL Server and MongoDB with Mongoose from a boilerplate.

About the NPM Package

Package Installation

npm install -g express-generator-node-typescript-apollo-graphql-mongo-cli

Package Usage

Go to the directory on terminal where you want to generate the project.

$ cd PATH

and run the generator command with specifying the project name.

$ express-generator-ntagm --name="PROJECT_NAME"

For more information you can check this article: https://www.linkedin.com/pulse/create-graphql-api-2-minutes-using-node-typescript-apollo-t%C3%BCrker/

Documentation for the Boilerplate

When you generate the project, you will have;

Tech Stack

Features

  • Multiple GraphQL Queries with implementations in Typescript
  • Multiple GraphQL Mutations with implementations in Typescript
  • Multiple GraphQL Schemas with implementations in Typescript
  • Multiple Controllers with implementations in Typescript
  • Multiple Mongoose Models with implementations in Typescript
  • MongoDB Connection, Repository Layer implementations in Typescript
  • CRUD operations for Multiple Entities with implementations in Typescript

Architecture

This boilerplate has common graphql api design architecture. Layers:

  • Controllers holds implementation for the business logic, like retrieving data from repositories, returning those data to queries and mutations, saving data etc.
  • Database holds MongoDB connection provider
  • Models holds document interfaces, schema definitions and models for MongoDB & Mongoose
  • Mutations holds basic mutation implementation; create, update, delete
  • Queries holds basic query implementation; retrieve
  • Resolvers holds resolver definitions for Apollo Server
  • Schemas holds schema definitions for Apollo Server

Installation

Install the dependencies and devDependencies:

$ cd <Project Name>
$ npm install

Set environment parameters on .env:

PORT="{{PORT NUMBER WHERE THE APP WILL WORK}}"
MONGO_DB_PATH="{{MONGODB CONNECTION URL STRING}}"

And that's all, start the server

$ npm start

Documentation for the Generator Project

Tech Stack

Plugins

express-generator-ntagm is currently extended with the following plugins. Instructions on how to use them in your own application are linked below.

PluginUsage
ejsto render global parameters like Project Name
inquirerto ask questions and parse input
shelljsto eliminate your shell script's dependency on Unix
yargsto build interactive command line tools
shxto wrap around ShellJS Unix commands
ts-nodeto execute TypeScript and REPL for node.js, with source map support

Installation

express-generator-ntagm requires Node.js v10+ to run.

Install the dependencies and devDependencies and start the application.

$ cd express-generator-node-typescript-apollo-graphql-mongo
$ npm install
$ npm start

To install the CLI globally:

$ npm run-script build
$ npm install -g .

And global usage:

$ express-generator-ntagm --name="PROJECT_NAME"

Authors

  • Fatih Türker

Sponsors

No sponsors yet! Will you be the first?

Contributors

No contributers yet! Will you be the first?

License


MIT

Keywords

FAQs

Package last updated on 25 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc