-
Notifications
You must be signed in to change notification settings - Fork 3
01 Setup
JP Barbosa edited this page Oct 15, 2022
·
2 revisions
npx create-react-app typescript-crud --template typescript
cd typescript-crud
rm ./src/App.css
#rm ./src/App.test.tsx
#rm ./src/reportWebVitals.ts
mkdir ./src/components
mkdir ./src/contexts
mkdir ./src/hooks
mkdir ./src/interfaces
mkdir ./src/pages
yarn add axios class-validator
code ./public/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="A guide to build a TypeScript CRUD"
/>
<title>TypeScript CRUD</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
code ./src/App.tsx
const App: React.FC = () => {
return (
<div className="App">
<header>
<h1>
<div className="title">TypeScript CRUD</div>
<div className="subtitle">With React and TypeORM</div>
</h1>
</header>
</div>
);
};
export default App;
yarn start
git add .
git commit -m "Setup"