• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

12
Views
Is it possible to get pages from remote file system with next.js

Hi I am quite new to advance frontend technologies and I have simple question.

scenario

I would like to use next.js and its feature: server side rendering. I would like also to have my js, css and html files stored in outside of host machine where next.js is running. I want to have my files in azure blob storage. It is neccessary because I would like to have many SPA pages and single wwwroot directory is not enough for me.

Problem

By default next.js get its files from pages directory at host machine. Is it possible to tell next.js to get files from other file system etc. In this scenario it would be azure storage. I could not find any example or extension point to do that.

about 1 month ago ·

Juan Pablo Isaza

1 answers
Answer question

0

Thank you psygik. Posting your suggestion as an answer to help other community members.

You can only define your page structure in pages directory. After build, Next.js serves the static JS and CSS from .next/static/ folder. Contents of which can be moved to a storage uploaded as _next/static/

You can refer to CDN Support with Asset Prefix, API/next.config.js/CDN Support with Asset Prefix and How to serve static generated pages via CDN with Next.js

about 1 month ago · Juan Pablo Isaza Report
Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.