server {
listen 80;
server_name glinka.tk www.glinka.tk;
index index.html index.htm;
root /home/kentforth/webapps/Glinka-Frontend-Nuxt;
location / {
proxy_pass http://localhost:6050;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
error_log /var/log/nginx/glinka-frontend-error.log;
access_log /var/log/nginx/glinka-frontend-access.log;
}
async getAllUsers() {
const {data: users} = await axios.get('http://jsonplaceholder.typicode.com/users')
.then(()=> {
this.posts = this.posts.map(p => {
p.author = users.find(u => u.id === p.userId)
return p
})
console.log(this.users)
})
.catch(error => {
console.log(error)
})
},