Reader small image

You're reading from  AWS CDK in Practice

Product typeBook
Published inJun 2023
PublisherPackt
ISBN-139781801812399
Edition1st Edition
Right arrow
Authors (2):
Mark Avdi
Mark Avdi
author image
Mark Avdi

Mark Avdi is an Engineer, Solutions Architect and currently the CTO of Westpoint Software Solutions. He has gained his invaluable experience through decades of coding programs, designing software, and managing complex cloud infrastructures in multiple industries with different sets of challenges using a variety of solutions. Mark is a technologist; he keeps up with the trends and believes in the power of technology as an ultimate tool to help businesses prosper and tackle problems our world currently faces.
Read more about Mark Avdi

Leo Lam
Leo Lam
author image
Leo Lam

Leo Lam is an AWS Certified Solutions Architect and the COO of Westpoint Software Solutions. While having detailed knowledge of the vast array of services AWS currently provides, he maintains the close relationship between AWS & Westpoint as partners. Leo comes from a sporting background and uses his experience to effectively integrate the dynamics of sporting philosophy into day-to-day software development to build teams and workflows that constantly deliver.
Read more about Leo Lam

View More author details
Right arrow

Fixing the frontend code

The frontend is a standard React application. The application entry point is index.ts, which is located under the ./web/src directory. This, in turn, loads the App component. The App component holds the Header, SideBar, and Main components of our application. You can examine the rest of the code by yourself, but the bits we are interested in are within the Main component, which is located at /web/src/components/Main/index.ts. Open the file in your text editor and let’s examine what is happening with our frontend not being able to make the calls to our API. See the following extract of the file:

...
{ MainContainer } from './styles';
/* ----------
 * Add backend URL provided by the cdk deploy here!
 * ---------- */
const backend_url = 'http://localhost:3333/';
export const Main: React.FC = () => {
  /* ----------
   * States
   * ---------- */
  const [todos, setTodos] = useState...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
AWS CDK in Practice
Published in: Jun 2023Publisher: PacktISBN-13: 9781801812399

Authors (2)

author image
Mark Avdi

Mark Avdi is an Engineer, Solutions Architect and currently the CTO of Westpoint Software Solutions. He has gained his invaluable experience through decades of coding programs, designing software, and managing complex cloud infrastructures in multiple industries with different sets of challenges using a variety of solutions. Mark is a technologist; he keeps up with the trends and believes in the power of technology as an ultimate tool to help businesses prosper and tackle problems our world currently faces.
Read more about Mark Avdi

author image
Leo Lam

Leo Lam is an AWS Certified Solutions Architect and the COO of Westpoint Software Solutions. While having detailed knowledge of the vast array of services AWS currently provides, he maintains the close relationship between AWS & Westpoint as partners. Leo comes from a sporting background and uses his experience to effectively integrate the dynamics of sporting philosophy into day-to-day software development to build teams and workflows that constantly deliver.
Read more about Leo Lam