Deployment Steps
1 Basic environment preparation
# Required Tools
- Node.js v18+ (LTS recommended)
- npm v9+ or Yarn v1.22+
- Git
# Verify installations
node -v && npm -v
2 Get front-end code
git clone https://github.com/ethereumfair/opendex.git
cd opendex
3 Install dependencies
npm install
# OR
yarn install
4 Start the development server
npm run serve
# Access via http://localhost:8080
5 Build the production environment
npm run build
# Static files will be generated in the /dist directory
6 Deploy to local server
Recommended Nginx configuration example:
server {
listen 8080;
server_name localhost;
location / {
root /path/to/dist;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
}
Restart Nginx after configuration:
sudo systemctl restart nginx
Last updated