Skip to content

Commit

Permalink
Merge pull request #61 from #53
Browse files Browse the repository at this point in the history
CRUD de Hunt e CRUD de Collection prontos
  • Loading branch information
CPeluti authored Aug 25, 2022
2 parents bd622c6 + 0d26a57 commit 61eb6be
Show file tree
Hide file tree
Showing 13 changed files with 1,579 additions and 63 deletions.
10 changes: 8 additions & 2 deletions backend/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ const dotenv_1 = __importDefault(require("dotenv"));
const mongoose_1 = __importDefault(require("mongoose"));
//import routes
const User_1 = __importDefault(require("./routes/User"));
const Question_1 = __importDefault(require("./routes/Question"));
const Login_1 = __importDefault(require("./routes/Login"));
const Hunt_1 = __importDefault(require("./routes/Hunt"));
const Collectionable_1 = __importDefault(require("./routes/Collectionable"));
dotenv_1.default.config();
const app = (0, express_1.default)();
app.use(express_1.default.json());
const port = process.env.PORT;
const dbUser = process.env.DB_USERNAME;
const dbPasswd = process.env.DB_PASSWORD;
// mongoose.connect(`mongodb://cerradogo:cerradogo@localhost:27017`)
mongoose_1.default.connect(`mongodb+srv://${dbUser}:${dbPasswd}@cluster0.ub24ryp.mongodb.net/?retryWrites=true&w=majority`);
//mongoose.connect(`mongodb://cerradogo:cerradogo@localhost:27017`)
app.use('/user', User_1.default);
app.use('/question', Question_1.default);
app.use('/login', Login_1.default);
app.use('/hunt', Hunt_1.default);
app.use('/collectionable', Collectionable_1.default);
app.listen(port, () => {
console.log(`server rodando na porta ${port}`);
});
Loading

0 comments on commit 61eb6be

Please sign in to comment.