Skip to content

Commit

Permalink
Add a /server-info endpoint to emulate production/staging deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
waxlamp committed Jul 13, 2022
1 parent d045018 commit 762bdf3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions web/vue.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const child_process = require('child_process');
const axios = require('axios');

function getVersion() {
// Try to get the version via `git` if available; otherwise fall back on
Expand Down Expand Up @@ -34,7 +35,19 @@ module.exports = {
devServer: {
// The default port 8080 conflicts with Girder
port: 8085,

// This proxy emulates the Netlify redirect to the backend (on the staging
// and production deploys).
proxy: {
'^/server-info/$': {
target: process.env.VUE_APP_DANDI_API_ROOT,
pathRewrite: {
'/server-info': '/info',
},
},
},
},

chainWebpack: (config) => {
config
.plugin('moment-locales')
Expand Down

0 comments on commit 762bdf3

Please sign in to comment.