saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.69k stars 215 forks source link

Nextron database Produccion Build #416

Closed divol89 closed 7 months ago

divol89 commented 8 months ago

Hello , im struggling to find the way how to use my database ,locally with nextron on production is it restricted ? i build 1 simple POST method + sqlite3 database and after npm run build is not working ,

here is the build warning :

warn - Statically exporting a Next.js application via next export disables API routes. This command is meant for static-only hosts, and is not necessary to make your application static. Pages in your application without server-side data dependencies will be automatically statically exported by next build, including pages powered by getStaticProps. Learn more: https://nextjs.org/d

bm777 commented 7 months ago

@divol89 where do you want to store or host the database?

If online, you can use normal API calls in nextjs directly. if offline, you must operate with IPC (handled in node or via sh using child-process)

divol89 commented 7 months ago

thanks , i practiced a lot now i understand i did. a lot of research :D

bm777 commented 7 months ago

Great. and sorry for the late reply @divol89