Hi everyone
I am busy redoing my first landing page for shoppingtracker.app (After a bunch of useful comments from the IH community), and then wondered whether it is best practice to do it as a separate codebase or as part of my app?
By that I mean that I build the landing page using something like Hugo and have it on yoursite.com and then running your app on app.yoursite.com? I would like to add a blog in the future as another form of marketing, but would that complicate it even more? Or do I just build my landing page as part of my React app and keep everything together? I am using Ionic though, so that might complicate things when I compile for mobile.
Like stated elsewhere, I am still quite new to web development hence the question regarding best practice.
@Sorata Tons of good suggestions here. Personally, the Gatsby + Contentful + Netlify combo for landing pages has worked really well for me.
Thanks @ajawsh. Contentful looks a bit like overkill though? How have you been using it? Must admit though that I have just read through their landing page
Yes might be overkill depending on the use case. I've used it in the past so I can change content on the landing page without having to change code (but still have a static website.)
That is a good point. Maybe something to consider in any case
In general, most people have a separate landing page as you described. React apps are not great for SEO, while static pages are excellent for SEO. Also, combining means there is only one deploy path for both marketing site and app. That may not be a big deal for a solo indiehacker. See: https://twitter.com/tylertringas/status/1250521285630836741?lang=en
That being said, I've broken these rules by building both my marketing site and app on Gatsby which is a react-based static site generator (for SEO) that also can run react apps.
Thanks @stevenkkim. I found that quite helpful, especially since I haven't really thought too much about growth in that sense.
You guys have convinced me to split up it for now, so thank you for that! Will also check out Gatsby a bit, since it was a bit of a coin toss between that and Hugo
I should have mentioned that the reason I decided to combine my app and marketing site with Gatsby are:
That's quite clever. I do like the idea of being able to easily share components, etc between the two, but I'm not sure how nicely Gatsby will play with Ionic.
Definitely something to keep in mind for the next project though
I'm no expert dev, so not sure about best practices. Currently, my codebase is also split exactly as you've described - example.com, app.example.com, api.example.com
My landing page will likely be static, so I'll just host it on github or wherever. The other two are on different virtual servers, because I wanted to scale them separately if needed.
I still have the option of merging my landing page with the app and dropping app.example.com
Thank you @thecrev. Expert or not, it still helps to hear what other developers are doing. I am specialised in ERP software during the day, so all of this stuff is still very new to me.
Good point regarding hosting the API and app on different servers... I suppose I'll have to worry about that if I get to a point that scaling matters 😅
This comment was deleted 3 years ago
Thank you @peterparker. You have given me a lot of food for thought. These are all little things I have never thought of. But yes, I think you and the other comments here have convinced me to keep it separate for now.
Must say though that this has been quite a learning curve, and a fun one at that.
This comment was deleted 3 years ago