Giorgio Galante
05/19/2022, 9:54 PMFrank
/packages/cli/test/playground
, it’s an SST app that’s hooked up to local resources
and core
. It’s got a bunch of stacks in there, most of them commented out.Giorgio Galante
05/20/2022, 3:30 PMFrank
yarn
4. yarn build
5. yarn watch
(changes to packages/core
and pakcages/resources
will get picked up by packages/cli
playground)
6. cd into packages/cli/test/playground
7. open up lib/index.ts
, I think u just need 1 stack to test it out, so just leave the ApiStack
in there and comment out the rest.
8. create a hello world .NET 6 project in src/dotnet6
9. open up lib/api-stack.ts
, feel free to remove all the constructs and just have this
const api = new sst.Api(stack, "Api", {
routes: {
"GET /": {
function: {
runtime: "dotnet6"
srcPath: "src/dotnet6"
handler: "MyApp::Example.Hello::MyHandler"
}
}
}
};
stack.addOutputs({
Endpoint: api.url || "no-url",
});
9. yarn build
10. yarn start
11. invoke the api’s url and see if it works
12. yarn deploy
13. invoke the api’s url and see if it worksFrank
Giorgio Galante
05/20/2022, 3:39 PMFrank
const api = new sst.Api(stack, "Api", {
routes: {
"GET /a": {
function: { runtime: "dotnet6", ... }
},
"GET /b": {
function: { runtime: "dotnetcore3.1", ... }
},
"GET /c": {
function: { runtime: "python3.9", ... }
},
}
};
Frank
Giorgio Galante
05/20/2022, 3:48 PMGiorgio Galante
05/20/2022, 3:50 PMFrank
Frank
Giorgio Galante
05/20/2022, 3:55 PMFrank
Giorgio Galante
05/20/2022, 4:05 PMFrank
v1.2.0
, lemme know if it works for u.Giorgio Galante
05/23/2022, 8:34 PM