-
-
Save destroyer22719/5cfd95daa61761fea06be6fa180ef8f1 to your computer and use it in GitHub Desktop.
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
const express = require('express'); | |
const app = express(); | |
const serverless = require('serverless-http'); | |
require('dotenv').config(); | |
app.get('/', (req, res) => { | |
res.send('hello world'); | |
}) | |
app.get('/secret', (req, res) => { | |
res.send(process.env.API_KEY) | |
}) | |
module.exports.handler = serverless(app) | |
app.listen(process.env.PORT || 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment