This file contains hidden or 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 IF NOT EXISTS `users` ( | |
`id` int(11) NOT NULL, | |
`full_name` varchar(255) NOT NULL, | |
`user_name` varchar(255) NOT NULL, | |
`email` varchar(100) NOT NULL | |
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; | |
INSERT INTO `users` (`id`, `full_name`, `user_name`, `email`) VALUES | |
(1, 'Sam Ben', 'samben', '[email protected]'), | |
(2, 'Ofani Dariyan', 'ofani', '[email protected]'), |
This file contains hidden or 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 mysql = require('mysql'); | |
var express = require('express'); | |
var connection = mysql.createConnection({ | |
host: 'localhost', | |
user: 'root', | |
database: 'injection', | |
password: '', | |
multipleStatements: true // Mengaktifkan eksekusi multiple statement | |
}); | |
connection.connect(function(err){ |
This file contains hidden or 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
let https = require('https'); | |
let fs = require('fs'); | |
let options = { | |
key: fs.readFileSync('/opt/certs/example.com.key'), | |
cert: fs.readFileSync('/opt/certs/example.com.crt') | |
}; | |
https.createServer(options, function (req, res) { | |
res.writeHead(200); |
NewerOlder