|
@@ -1,18 +1,18 @@
|
|
|
const express = require('express');
|
|
|
-const { AvatarGenerator } = require('random-avatar-generator');
|
|
|
|
|
|
const app = express();
|
|
|
const port = 1854;
|
|
|
+const pfp = require('random-pfp');
|
|
|
|
|
|
app.get('/getRandomLink', (req, res) => {
|
|
|
- const randomAvatar = generator.generateRandomAvatar();
|
|
|
- res.json({ avatarLink: randomAvatar });
|
|
|
+ res.json({ link: pfp() });
|
|
|
});
|
|
|
|
|
|
-const generator = new AvatarGenerator();
|
|
|
|
|
|
-// Simply get a random avatar
|
|
|
-generator.generateRandomAvatar();
|
|
|
+
|
|
|
+app.get('/', (req, res)=>{
|
|
|
+ res.send(`<img src="${pfp()}" width="250px">`)
|
|
|
+})
|
|
|
|
|
|
app.listen(port, () => {
|
|
|
console.log(`Server running on port ${port}`);
|