Skip to content

Commit

Permalink
fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
zzeekk committed May 26, 2024
1 parent a8b7492 commit dbac2c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ The backend provider can be selected on startup. Supported backend providers are
Start a local https server to forward api request to repository server:
* complete basic stpeps above
* make sure nodejs is installed
* `npm install express http-proxy-middleware`
* create `config.json` with following properties:
- `port`: port to use
- `bitbucketServerUrl` Bitbucket server Url
- `sslKeyFile` + `sslCertFile`: if you have no certificate for the server, you can create self-signed certificate for testing with the following steps:
- openssl genrsa -out server.key 2048
- openssl req -new -key server.key -out server.crt.req
- openssl x509 -req -in server.crt.req -signkey server.key -out server.crt
- openssl x509 -req -in server.crt.req -signkey server.key -out server.crt
* run server: `node serve.cjs`
* open "https://localhost:<port>" in browser, choose Provider BitbucketServer

Expand Down
4 changes: 2 additions & 2 deletions serve.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ var devProxy = createProxyMiddleware({

var app = express();
app.use('/api/server', bitbucketServerProxy);
//app.use('/', express.static('build'));
app.use('/', devProxy); // use to forward to dev server started with `yarn start
app.use('/', express.static('build'));
//app.use('/', devProxy); // use to forward to dev server started with `yarn start

var privateKey = fs.readFileSync(config.sslKeyFile, 'utf8');
var certificate = fs.readFileSync(config.sslCertFile, 'utf8');
Expand Down

0 comments on commit dbac2c0

Please sign in to comment.