Question

How to access index.js on NextJS/Strapi

Hi, I am new to digital ocean/strapi and NextJS! I have created a strapi droplet and created a nextjs app. I can access strapi fine straight from the ip address, but cannot see how to access the nextjs app index.js.

Being inexperienced, to access the NextJS app, I have tried IP Adrress:3000 which doesn’t work. Can anyone please give me some pointers?

Thanks…


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi,

Thanks for the response. The answer turns our to be straight forward. When the Strapi droplet is created, port 3000 (used for NextJS) is blocked. So all that is needed is to open the port using ‘ufw allow 3000’ and the port is open and then index.js can be accessed using yourIPAddress:3000

Thanks…

KFSys
Site Moderator
Site Moderator badge
February 24, 2021

Hi @netsidedeveloper,

I completely understand you in regards to the NextJS application. I was the same in that regard. Having said that, DigitalOcean have pretty good documentation about how to get started with it, where you can find what’s needed for you and stuff like that. You can find that documentation here:

https://www.digitalocean.com/community/tech_talks/getting-started-with-next-js

Now, most probably you would need to install Nginx and configure it as a reverse proxy to your NextJS. I can provide you with simple steps or tutorials to follow but I would first recommend you checking the above documentation prior to actually going next to the Nginx stuff.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.