Skip to content

Commit

Permalink
Ports and deployability updates
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Jan 8, 2024
1 parent 8e5dd76 commit 19234f4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
'/api': {
target: process.env['services__weatherApi__1'],
target: process.env['services__weatherapi__1'],
pathRewrite: {
'^/api': '',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
var builder = DistributedApplication.CreateBuilder(args);

var weatherApi =
builder.AddProject<Projects.AspireJavaScript_MinimalApi>("weatherApi");
builder.AddProject<Projects.AspireJavaScript_MinimalApi>("weatherapi");

// Angular: npm run start
builder.AddNpmApp("angular", "../AspireJavaScript.Angular")
.WithReference(weatherApi)
.WithServiceBinding(scheme: "http", env: "PORT")
.WithServiceBinding(containerPort: 3000, scheme: "http", env: "PORT")
.AsDockerfileInManifest();

// React: npm run start
builder.AddNpmApp("react", "../AspireJavaScript.React")
.WithReference(weatherApi)
.WithServiceBinding(scheme: "http", env: "PORT")
.WithServiceBinding(containerPort: 3001, scheme: "http", env: "PORT")
.AsDockerfileInManifest();

// Vue: npm run dev
builder.AddNpmApp("vue", "../AspireJavaScript.Vue", "dev")
.WithReference(weatherApi)
.WithServiceBinding(scheme: "http", env: "PORT")
.WithServiceBinding(containerPort: 3002, scheme: "http", env: "PORT")
.AsDockerfileInManifest();

builder.Build().Run();
2 changes: 1 addition & 1 deletion samples/AspireWithJavaScript/AspireJavaScript.React/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# In order to consume environment variables in React, we need to prefix them with REACT_APP_.
REACT_APP_WEATHER_API=$services__weatherApi__1
REACT_APP_WEATHER_API=$services__weatherapi__1
# Disable opening browser on npm start
BROWSER=none
2 changes: 1 addition & 1 deletion samples/AspireWithJavaScript/AspireJavaScript.Vue/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# In order to consume environment variables in Vue with Vite, we need to prefix them with VITE_.
VITE_WEATHER_API=$services__weatherApi__1
VITE_WEATHER_API=$services__weatherapi__1

0 comments on commit 19234f4

Please sign in to comment.