Skip to content

Daviswww/apollo-server-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Backend Adventure

Install

$ yarn install

Create environment

Environment file example.

# .env
VERSION=1.0.0
NODE_ENV=development
PORT=3000
SECRET=

# Database
DB_HOST=127.0.0.1
DB_PORT=3306
DB_NAME=db
DB_USER=root
DB_PASS=1234

Getting Started

Run Server

$ yarn dev

Test

$ yarn test

or

Standard

https://standardjs.com/

yarn standard --fix

Jest

https://jestjs.io/

https://jestjs.io/docs/expect

https://pjchender.dev/npm/npm-jest/

yarn jest

Jest config

  "jest": {
    "verbose": true,
    "collectCoverage": true
  },

MySql

https://www.mysql.com/

$ mysql

Set the MySQL user password

mysql> ALTER USER 'user-name'@'localhost' IDENTIFIED BY 'NEW_USER_PASSWORD';

Creating and Selecting a Database

Creating

mysql> CREATE DATABASE menagerie;

Selecting

mysql> USE menagerie;

Releases

No releases published

Packages

No packages published