은승우

Update app.js

Showing 1 changed file with 5 additions and 4 deletions
......@@ -17,6 +17,7 @@ var httpsOptions = {
http.createServer(app).listen(80);
https.createServer(httpsOptions, app).listen(443);
/* if ssl expired
var greenlock= require('greenlock-express');
const lex = greenlock .create({
......@@ -38,7 +39,9 @@ const lex = greenlock .create({
});*/
//papago api
app.get('/photo/1.png',(req,res)=>{
res.send(fs.readFileSync('./photo/1.png'));
})
//번역 api_url
var translate_api_url = 'https://openapi.naver.com/v1/papago/n2mt';
......@@ -89,9 +92,7 @@ async function handleEvent(event) {
fs.writeFileSync('image.png',chunk);
});
});
app.get('/photo/1.png',(req,res)=>{
res.send(fs.readFileSync('./photo/1.png'));
})
var cheerio = require('cheerio');
......