This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
module.exports = (sequelize, DataTypes) => { | |
const Characters = sequelize.define('characters', { | |
characterId:{ | |
type:DataTypes.INTEGER, | |
primaryKey: true | |
}, | |
name:DataTypes.STRING, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
module.exports = (sequelize, DataTypes) => { | |
const Characters = sequelize.define('characters', { | |
characterId:{ | |
type:DataTypes.INTEGER, | |
primaryKey: true | |
}, | |
name:DataTypes.STRING, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ApiBuilder = require('claudia-api-builder'), | |
api = new ApiBuilder(); | |
module.exports = api; | |
api.get('/hello', function () { | |
return 'hello world'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ApiBuilder = require('claudia-api-builder'), | |
api = new ApiBuilder(); | |
module.exports = api; | |
api.get('/hello', function () { | |
return 'hello world'; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[default] | |
aws_access_key_id = YOUR_ACCESS_KEY | |
aws_secret_access_key = YOUR_ACCESS_SECRET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `characters` ( | |
`characterId` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(200) DEFAULT NULL, | |
`actor` varchar(200) DEFAULT NULL, | |
`description` varchar(500) DEFAULT NULL, | |
`debut` varchar(200) DEFAULT NULL, | |
`airDate` datetime DEFAULT NULL, | |
PRIMARY KEY (`characterId`) | |
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=latin1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ApiBuilder = require('claudia-api-builder'), | |
api = new ApiBuilder(); | |
var mysql = require('mysql'); | |
var {Op, Sequelize} = require('sequelize'); | |
module.exports = api; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ApiBuilder = require('claudia-api-builder'), | |
api = new ApiBuilder(); | |
var mysql = require('mysql'); | |
var {Op, Sequelize} = require('sequelize'); | |
module.exports = api; | |
api.get('/characters', function () { | |
return new Promise( | |
(resolve, reject) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "backend", | |
"version": "1.0.0", | |
"description": "Backend for Serverless demo", | |
"main": "app.js", | |
"dependencies": { | |
"claudia-api-builder": "^4.1.1", | |
"claudia": "^5.1.1" | |
}, | |
"devDependencies": {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"characterId": 1, | |
"name": "Homer Simpson", | |
"actor": "Dan Castellaneta", | |
"description": "Husband of Marge; father of Bart, Lisa, and Maggie.", | |
"debut": "Good Night (The Simpsons short)", | |
"airDate": "1987-04-19T00:00:00.000Z" | |
}, | |
{ |
OlderNewer