generated from fahricansecer/boilerplate-be
15 lines
345 B
JavaScript
15 lines
345 B
JavaScript
const axios = require('axios');
|
|
|
|
async function main() {
|
|
try {
|
|
const res = await axios.post('http://localhost:3000/api/auth/login', {
|
|
email: 'admin@contentgen.ai',
|
|
password: 'password123'
|
|
});
|
|
console.log(JSON.stringify(res.data, null, 2));
|
|
} catch(e) {
|
|
console.error(e.response?.data || e.message);
|
|
}
|
|
}
|
|
main();
|