-
-
Save alexito4/84e34ce6c66aa320d361781f1ffd946e 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
Diagnostics: | |
pulumi:pulumi:Stack: ahoy-pulumi-ahoy-pulumi-dev | |
error: Error serializing '(ev, ctx, cb) => { let body; ...': api.js(234,106) | |
'(ev, ctx, cb) => { let body; ...': api.js(234,106): captured | |
variable 'route' which indirectly referenced | |
'(req, res) => { const options = { me ...': index.js(7,22): which captured | |
module 'http' which indirectly referenced | |
function '<anonymous>': http.js(30,26): which referenced | |
function 'ClientRequest': _http_client.js(18,22): which referenced | |
function 'OutgoingMessage': _http_outgoing.js(48,24): which captured | |
module 'stream' which indirectly referenced | |
function 'Stream': legacy.js(6,15): which referenced | |
function 'Writable': _stream_writable.js(157,17): which captured | |
'realHasInstance', a function defined at | |
function '[Symbol.hasInstance]': which could not be serialized because | |
it was a native code function. | |
Function code: | |
function [Symbol.hasInstance]() { [native code] } | |
Capturing modules can sometimes cause problems. | |
Consider using import('http') or require('http') inside '(req, res) => { const options = { me ...': index.js(7,22) | |
error: an unhandled error occurred: Program exited with non-zero exit code: 1 | |
error: an error occurred while advancing the preview |
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
import * as cloud from "@pulumi/cloud-aws"; | |
import * as http from 'http'; | |
const endpoint = new cloud.API("langs"); | |
const counterTable = new cloud.Table("projectsTable", "project"); | |
endpoint.get("/test", (req, res) => { | |
const options: http.RequestOptions = { | |
method: "POST", | |
host: "https://api.github.com", | |
path: "/graphql" | |
} | |
http.request(options, (gres) => { | |
res.status(200).json({ "data": JSON.stringify(gres) }) | |
}) | |
}); | |
export const url = endpoint.publish().url; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment