Skip to content

Commit

Permalink
fix: use proper url when starting from cli
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Mar 17, 2024
1 parent 10a9ef5 commit 6475cbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cli/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function run() {
const server = createServer(options);

server.listen(options.port, () => {
const href = `http://localhost:${options.port}/_expo/atlas`;
const href = `http://localhost:${options.port}`;

console.log(`Metro bundle inspector is ready on ${href}`);
console.log('Loaded stats file:');
Expand Down
6 changes: 5 additions & 1 deletion src/cli/createServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import morgan from 'morgan';

import { type Options } from './resolveOptions';
import { StatsFileSource } from '../data/StatsFileSource';
import { env } from '../utils/env';
import { CLIENT_BUILD_DIR, SERVER_BUILD_DIR } from '../utils/middleware';

export function createServer(options: Options) {
Expand All @@ -17,7 +18,10 @@ export function createServer(options: Options) {
app.disable('x-powered-by');

app.use(compression());
app.use(morgan('tiny'));

if (env.EXPO_ATLAS_DEBUG) {
app.use(morgan('tiny'));
}

// TODO(cedric): replace with middleware once we can
app.use(
Expand Down

0 comments on commit 6475cbd

Please sign in to comment.