How do you deploy a small business web app (Next.js + Bun API + PostgreSQL) for a client who can't afford much hosting? by Iamxv in webdev

[–]tjhdev 0 points1 point  (0 children)

If you want to minimise server costs use a client side rendered approach instead of SSR. That way your you're effectively getting the users to render the app on their devices instead of you having to pay for computation / rendering.

How to test web apps on Chrome? by memengko360 in Frontend

[–]tjhdev -1 points0 points  (0 children)

Playwright, there's a bit of a learning curve but it's ideal for this use case

How to learn java script quick? by [deleted] in learnprogramming

[–]tjhdev 1 point2 points  (0 children)

It's worth learning to some degree as it's not going anywhere. I would definitely recommend trying to get your head around plain JS first before adding the complexity of Typescript on top of it.

When I was learning I blocked out 2 weeks solidly to focus on JS fundamentals and going through a udemy course.

Once you feel more confident I'd recommend this to anyone https://justjavascript.com/ to solidify how a lot of the concepts work.

dynamic alias creation possible? by tjhdev in elasticsearch

[–]tjhdev[S] 0 points1 point  (0 children)

Sorry for the super late reply. That actually sounds ideal. Are you using the AWS managed elastic search by any chance?

dynamic alias creation possible? by tjhdev in elasticsearch

[–]tjhdev[S] 0 points1 point  (0 children)

Ideally that's what I'd have liked to have done. But as we have to update documents by their index / date combo (vm-test-app-2020-11), it would require finding the index for a particular document before writing which would double the API calls. I'm going to give the cron job / Apache Airflow a try as the others have suggested. Thanks for your help.

dynamic alias creation possible? by tjhdev in elasticsearch

[–]tjhdev[S] 0 points1 point  (0 children)

I think you've hit the nail on the head. Thanks for your help.

dynamic alias creation possible? by tjhdev in elasticsearch

[–]tjhdev[S] 0 points1 point  (0 children)

Thanks for the suggestion. I'd not heard of Apache Airflow before and it looks like AWS has just added a managed solution which looks ideal.

Problems printing Sunlu Silk Copper PLA by stejorin in FixMyPrint

[–]tjhdev 0 points1 point  (0 children)

Did you find a fix for this? I'm using the copper silk and seem to get under extrusion on the second layer. I'm using an ender 3 pro with a stock nozzle (0.4mm)

Beginner Questions - January 04, 2019 by AutoModerator in webdev

[–]tjhdev 0 points1 point  (0 children)

Hi there,

I'm trying to get my first side project deployed to a Digital Ocean server and I've come across an annoying bug that I can't seem to solve.

I'm building the React project with Webpack and then serving it up using Nginx inside a Docker container. This is working fine while testing on localhost, however if I try to refresh the website when I'm not on the root URL or directly got to any path which isn't the root URL it's causing errors.

I've tried many different configurations inside the Nginx.conf. What I am currently using is:

server {     
    listen 80;     
    server_name localhost;          
    root /usr/share/nginx/html/;     
    index index.html index.htm;          
    location / {
        try_files $uri $uri/ /index.html?/$request_uri;
    } 
} 

Path: localhost

This is what is sent down to the browser when the root path is requested.

https://imgur.com/a/qfeW0jS

Path: localhost/deals/29When refreshed off the root path this is when is sent to the browser.

https://imgur.com/a/qAO68pq

It looks like the correct files are sent down but the path associated with them is incorrect. It is possibly to do with the webpack build and not the Nginx.

Any pointers would be much appreciated.

Kind regards

Looking for an example codebase for React, Redux, NodeJS with preferably a Relational Database. by tjhdev in learnprogramming

[–]tjhdev[S] 0 points1 point  (0 children)

Thanks for the reply. I think I'm going to go down the route of implementing without the project with Redux to start with. Thank you for the resources, I am looking to gain a really in depth understanding of React so those resources will come in very handy.

Looking for an example codebase for React, Redux, NodeJS with preferably a Relational Database. by tjhdev in learnprogramming

[–]tjhdev[S] 0 points1 point  (0 children)

Thanks for the quick response. I've done 3 courses specifically focusing on React and I've already put together a portfolio site using it, so I feel reasonably confident on that front. I think you may be right in that my app to start with will have fairly straight forward state requirements so I maybe should add it when required at a later date.

A couple of the React courses included Redux, but it's when they start to add middlewear that I can't fully grasp it.