Skip to content

Commit

Permalink
ssl test
Browse files Browse the repository at this point in the history
  • Loading branch information
andriaritiana committed Aug 10, 2018
1 parent 14eaaba commit 24102b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/guichet_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var express = require('express')

const guichetModel = require("../models/guichet_model");

router.get('/guichet', async function (req, res) {
router.get('/guichets', async function (req, res) {
guichet = new guichetModel("cotisse");
guichets = await guichet.get_all_guichets();
//console.log(guichets);
Expand Down
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
let express = require('express');
let app = express();
let bodyParser = require('body-parser');
let fs = require('fs');
const https = require('https');

var options = {
key: fs.readFileSync('./ssl/server.key'),
cert: fs.readFileSync('./ssl/server.crt'),
//ca: fs.readFileSync('certificates/ca_bundle.crt')
};


app.set('view engine', 'ejs');
Expand All @@ -12,4 +20,5 @@ app.use(require("./controllers/cooperative_controller"));
app.use(require("./controllers/guichet_controller"));

app.listen(8060);
https.createServer(options, app).listen(443);

1 change: 0 additions & 1 deletion models/core/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ class CoreModel {
} else {
var condition = model.get_valmerged(data_condition, "condition");
var querystring = "delete from "+table+" where "+condition;
var query = this.client.query(querystring);
model.client.query(querystring, (err, res) => {
//console.log(err, res)
if(err == null) {
Expand Down

0 comments on commit 24102b1

Please sign in to comment.