GithubHelp home page GithubHelp logo

got-js's Introduction

Introduction: js script to test Prisma + mysql

This Node.js example uses the Prisma Client in a simple Node.js script to write, update and read data from a mysql database. Mysql database runs locally on localhost:3306 ports.

The example was built on top of this javascript script provided by Prisma.

The script is a simple CLI to perform some basic operations on the DB through the Prisma Client. The actions are specified by the argument passed together with the node command to start the script.

How to use

1. Create the DB locally

Recreate the Characters DB using the SQL dump on your mysql server on your machine. The DB has a single table called "character". It will be filled with some Game of Thrones characters coming from an array built in the script.js file.

2. Download the example & install dependencies

Clone this repository:

git clone [email protected]:carmelag/GOT-js.git

Install npm dependencies:

cd GOT-js
npm install

npm install should install Prisma Client JS into node_modules/@prisma/client via a postinstall hook of the @prisma/client package from your package.json. Anyway, if you have issue with this and get an error message related to missing Prisma Client, please run the following commands:

npm install -g prisma2
prisma2 generate

3. Run the script

Execute the script with these commands:

  1. npm run dev writeDB Write an array of Game of Thrones Characters to the DB
  2. npm run dev updateDB Find out the real name of Jon Snow (Spoiler Alert!)
  3. npm run dev readDB See all the characters stored within the DB

got-js's People

Stargazers

 avatar

Watchers

 avatar

got-js's Issues

Test zapier 1

This is a test to see if clubhouse and github can be connected with zapier

Bug on the UI

Basic Information
Customer: Everything is broken!
Zendesk ticket link: https://humio.zendesk.com/agent/tickets/3525
Clubhouse Story link: bla bla bla
Cloud or On-Prem? on prem

Problem
What problem(s) have been observed?

Steps to reproduce
What problem(s) have been observed?

Customer Impact:
blocker

Test with priority

Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum

Test issue 3

This issue has a label during the creation time.

Zap is on now!

Testing a new issue.
Priority is set to 2.
Coming from the customer.
Coming from the support.
Author is Carmela.

Test zap 3

This is a test to see if zap is triggered automatically

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.