Spaces:
Sleeping
Sleeping
Update app.js
Browse files
app.js
CHANGED
|
@@ -5,11 +5,11 @@ import { WebSocketServer, WebSocket } from 'ws';
|
|
| 5 |
import { v4 as uuidv4 } from 'uuid';
|
| 6 |
// Make sure this points to the compiled mechanics.js file in your build output,
|
| 7 |
// or the JS version of your mechanics file.
|
| 8 |
-
import { resolveCombat, getDerivedStats, breedOffspring, INITIAL_STATE } from './
|
| 9 |
|
| 10 |
const app = express();
|
| 11 |
// Hugging Face Spaces and other cloud PaaS use process.env.PORT (HF uses 7860)
|
| 12 |
-
const PORT = process.env.PORT ||
|
| 13 |
|
| 14 |
// Enable CORS so your separate frontend can communicate
|
| 15 |
app.use(cors({
|
|
|
|
| 5 |
import { v4 as uuidv4 } from 'uuid';
|
| 6 |
// Make sure this points to the compiled mechanics.js file in your build output,
|
| 7 |
// or the JS version of your mechanics file.
|
| 8 |
+
import { resolveCombat, getDerivedStats, breedOffspring, INITIAL_STATE } from './mechanics.js';
|
| 9 |
|
| 10 |
const app = express();
|
| 11 |
// Hugging Face Spaces and other cloud PaaS use process.env.PORT (HF uses 7860)
|
| 12 |
+
const PORT = process.env.PORT || 7860;
|
| 13 |
|
| 14 |
// Enable CORS so your separate frontend can communicate
|
| 15 |
app.use(cors({
|