|
@@ -1,6 +1,5 @@
|
|
|
-
|
|
|
const express = require('express');
|
|
|
-import { AvatarGenerator } from 'random-avatar-generator';
|
|
|
+const { AvatarGenerator } = require('random-avatar-generator');
|
|
|
|
|
|
const app = express();
|
|
|
const port = 1854;
|
|
@@ -10,15 +9,11 @@ app.get('/getRandomLink', (req, res) => {
|
|
|
res.json({ avatarLink: randomAvatar });
|
|
|
});
|
|
|
|
|
|
-
|
|
|
-
|
|
|
const generator = new AvatarGenerator();
|
|
|
|
|
|
// Simply get a random avatar
|
|
|
generator.generateRandomAvatar();
|
|
|
|
|
|
-
|
|
|
app.listen(port, () => {
|
|
|
console.log(`Server running on port ${port}`);
|
|
|
- });
|
|
|
-
|
|
|
+});
|