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
res.cookie('APP_COOKIE', result.access_token, { | |
'httpOnly': false, | |
'signed': false, | |
'encode': String | |
}) |
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
res.redirect('send') |
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
app.get('/send', (req, res) => { | |
res.render('send') | |
}) |
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
<!doctype html> | |
<html> | |
<head> | |
<title>λ¬Έμ λ°μ‘</title> | |
</head> | |
<body> | |
<form action="/send" method="post"> | |
<input type="text" placeholder="λ°μ λ²νΈ" name="from"> | |
<input type="text" placeholder="μμ λ²νΈ" name="to"> | |
<input type="text" placeholder="λ΄μ©" name="text"> |
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
const bodyParser = require('body-parser') | |
app.use(bodyParser.urlencoded({ | |
extended: true | |
})) |
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
app.post('/send', async (req, res) => { | |
const { from, to, text } = req.body | |
const { APP_COOKIE } = req.cookies | |
const result = await request({ | |
method: 'POST', | |
uri: 'https://api.solapi.net/messages/v4/send', | |
headers: { | |
'Authorization': `bearer ${APP_COOKIE}` | |
}, | |
body: { |
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
π Morning 120 commits βββββββββββββββββββββ 13.2% | |
π Daytime 380 commits βββββββββββββββββββββ 41.8% | |
π Evening 221 commits βββββββββββββββββββββ 24.3% | |
π Night 189 commits βββββββββββββββββββββ 20.8% |
OlderNewer