fixes
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
import express from 'express'
|
import express from 'express'
|
||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
|
dotenv.config()
|
||||||
|
|
||||||
import cors from 'cors'
|
import cors from 'cors'
|
||||||
|
|
||||||
const app = express()
|
const app = express()
|
||||||
const port = 5000
|
const port = 5000
|
||||||
|
|
||||||
app.use(express.json())
|
app.use(express.json())
|
||||||
app.use(cors({ origin: 'http://localhost:5173' }))
|
app.use(cors())
|
||||||
dotenv.config()
|
|
||||||
|
|
||||||
import { prisma } from './prisma.js'
|
import { prisma } from './prisma.js'
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function Login() {
|
|||||||
const handleSubmit = async (e) => {
|
const handleSubmit = async (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
const res = await fetch('https://localhost:5000/login', {
|
const res = await fetch('http://localhost:5000/login', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ email, password })
|
body: JSON.stringify({ email, password })
|
||||||
@@ -35,7 +35,7 @@ function Login() {
|
|||||||
<>
|
<>
|
||||||
|
|
||||||
<div className="max-w-[800px] mx-auto p-20">
|
<div className="max-w-[800px] mx-auto p-20">
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<h3 className="text-center text-5xl mb-16">Inicia sesion</h3>
|
<h3 className="text-center text-5xl mb-16">Inicia sesion</h3>
|
||||||
|
|
||||||
<div className="flex flex-col mb-8">
|
<div className="flex flex-col mb-8">
|
||||||
@@ -58,7 +58,7 @@ function Login() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="">
|
<div>
|
||||||
<input type="submit" value="Acceder" class="bg-[#00A4B6] hover:bg-[#027481] transition cursor-pointer py-3 px-10 rounded uppercase font-extrabold tracking-wider w-full" />
|
<input type="submit" value="Acceder" class="bg-[#00A4B6] hover:bg-[#027481] transition cursor-pointer py-3 px-10 rounded uppercase font-extrabold tracking-wider w-full" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user