Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
Cómo implementar el servidor NextJS + Express

Tengo tal estructura de mi proyecto.

cliente - con parte FrontEnd

servidor - parte BackEnd (Express)

ingrese la descripción de la imagen aquí

Y secuencias de comandos del servidor package.json

ingrese la descripción de la imagen aquí

Para iniciar NextJS + Express en localhost:

 const PORT = process.env.PORT || 5000 const app = express() app.use(express.json()); app.use(cookieParser()); app.use(cors({ credentials: true, origin: process.env.CLIENT_URL })); app.use(express.urlencoded()); //Parse URL-encoded bodies app.use("/api", userRouter, categoriesRouter, catalogRouter, storageRouter, ordersRouter); app.use(errorMiddleware); const isDev = process.env.NODE_ENV !== 'production' // if isDev === 'development' if(isDev) { const start = async () => { try { await mongoose.connect(process.env.DBURL, { useNewUrlParser: true, useUnifiedTopology: true }) app.listen(PORT, () => console.log(`Server started on PORT = ${PORT}`)) } catch (e) { console.log(e) } } start() } // if isDev === 'production' if(!isDev) { // what should be here to deploy production version? }

Pero, ¿qué debo hacer para implementar mi servidor, por ejemplo, en Heroku? No puedo encontrar ningún recurso con un ejemplo de implementación nextJS + Express.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!