Node.js
- 6 ответов
- 0 вопросов
3
Вклад в тег
try {
await user.save()
ctx.body = user;
} catch (err) {
ctx.throw(403, "Cannot create user or user is already created!");
}
app.use(express.static('public'));
var express = require('express');
var app = express();
app.use(express.static('public'));
app.listen(8000, function() {
console.log("Server started at " + 8000 + " port");
});