404 when trying to enter a react app route

I just deployed my react app build on c-panel. The app includes different routes and everytime I try to get to one of them I get 404 Not found.
For example if I try to get to http://example.com/ it will enter the website, and if I’ll press on a button which links me tohttp://example.com/articles it will work. But If I’ll try to get http://example.com/articles from a link that I shared or just typing this address I’ll get 404 Not found. This is not happening when I’m running the develope mode on localhost.

replace json key with another json value using node js / javascript

testDetails.map(function(data){ let JsonData={ title: data["title"], url: data["url"], firstName: data["username"], work:[{workid:data["workid"].slice(","), workname: "tester"}], employee: [{employee_id: data["employee_id"].slice(","), employee_desk:"custom"}] } }) so my above json output look like this { "title":"01" "url":"<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="05606875696a7c60457077692b666a68">[email protected]</a>", "firstName":"employee name", "work":[{"workid":"9371", "workname": "tester"}], "employee":[{"employee_id":"weh34",employee_desk:"custom"}] } and another JSON object where data look like this let data={ "031w":"ewid3728e", "9371":"emp_01", "weh34":"work_place01" } The … Read more

returning values from fs.readdir by using Promise in node js /javascript

function fileType() { return new Promise((resolve, reject) => { let Fields = fs.readdir( path.resolve(__dirname, "access"), (err, files) => { if (err) { reject(err); return; } else { files.map((file) => { return file.split(".").slice(0, -1).join("."); }); } } ); resolve(Fields); }); } async function ambitious(data) { let fields = []; if (data.collections) { fields= await fileType(); } … Read more