A React application with an Express backend for working with Autodesk Platform Services (APS) Viewer.
aps-viewer-react/
├── src/ # React frontend source
├── server/ # Express backend
│ ├── index.ts # Server entry point
│ └── README.md # Server documentation
├── public/ # Static assets
├── .vscode/ # VS Code debug configurations
└── .env # Environment variables
- Node.js (v14 or higher)
- npm or yarn
# Install dependencies
npm install
# Or use yarn
yarn installRun both the Express server and React dev server:
yarn devThis will:
- Start the Express server on port 3000
- Start the React dev server on port 3001 (proxied through 3000)
- Automatically open your browser to http://localhost:3000
# Run React dev server only (port 3001)
yarn start
# Run Express server only (port 3000)
yarn server
# Run tests
yarn test
# Build for production
yarn build
# Run production server
yarn start:prod- Express Server (Port 3000): Main entry point that handles API requests and proxies frontend requests
- React Dev Server (Port 3001): Development server with hot module reloading
- In development, all requests to port 3000 are handled:
/api/*→ Express API endpoints- Everything else → Proxied to React dev server
See server/README.md for detailed API documentation.
GET /api/:url/token- Fetch authentication tokenGET /api/:url/urn- Fetch metadata URNGET /api/health- Health check endpoint
VS Code debug configurations are available:
- Debug Server - Debug the Express server with breakpoints
- Debug Server with Nodemon - Debug with auto-restart on file changes
Press F5 or go to Run and Debug (⇧⌘D) to start debugging.
If you encounter port conflicts:
# Clear ports 3000 and 3001
lsof -ti:3000 -ti:3001 | xargs kill -9Create a .env file in the root directory:
PORT=3001 # React dev server port
BROWSER=none # Prevent auto-opening browser on React start# Build the React app
yarn build
# Start the production server
yarn start:prodThe Express server will serve the built React app from the build/ folder.
- Frontend: React, TypeScript
- Backend: Express, TypeScript, ts-node
- Development: nodemon, concurrently, http-proxy-middleware
- Viewer: Autodesk Platform Services (APS) Viewer
If you see EADDRINUSE errors, clear the ports:
lsof -ti:3000 -ti:3001 | xargs kill -9Make sure all dependencies are installed:
yarn install- Check for port conflicts
- Verify
.envfile exists withPORT=3001 - Check server logs in the Debug Console