Skip to content

Instantly share code, notes, and snippets.

https://google-gruyere.appspot.com/GRUYEREINSTANCEID/snippets.gtl
https://google-gruyere.appspot.com/GRUYEREINSTANCEID/snippets.gtl
const express = require('express')
const models = require('./models')
const app = express()
const bodyParser = require('body-parser')
app.use(bodyParser.urlencoded({extended: false}))
app.use(bodyParser.json())
app.get('/heros',(req,res) => {
models
const express = require('express');
const app = express();
const port = 3000;
const connection = require('./conf');
// Support JSON-encoded bodies
app.use(express.json());
// Support URL-encoded bodies
app.use(express.urlencoded({
extended: true
mysql> SELECT te.name,COUNT(*) AS nb_joueurs FROM player AS pl JOIN team AS te ON te.id=pl.team_id GROUP BY te.name ORDER BY te.name DESC;
+------------+------------+
| name | nb_joueurs |
+------------+------------+
| Slytherin | 21 |
| Ravenclaw | 15 |
| Hufflepuff | 12 |
| Gryffindor | 36 |
+------------+------------+
4 rows in set (0.00 sec)