Repository containing the application created in the third edition of the Rocketseat NLW event.
yarn create react-app web --template typescript
npx create-react-app web --template typescript
sudo npm install -g typescript
tsc --help
interface User {
name: string,
age: number,
address: {
country: string,
state: string
}
}
function printUser(user: User) {
console.log(user);
}
printUser({
name: "Gabriela",
age: 29,
address: {
country: "Brazil",
state: "RS"
}
});
function printUser(user) {
console.log(user);
}
printUser({
name: "Gabriela",
age: 29,
address: {
country: "Brazil",
state: "RS"
}
});
tsc index.ts
node index.js
yarn add react-icons
npm install react-icons
yarn add react-router-dom
yarn add @types/react-router-dom -D
npm install react-router-dom
npm install @types/react-router-dom -D
yarn add leaflet react-leaflet
yarn add @types/react-leaflet -D
npm install leaflet react-leaflet
npm install @types/react-leaflet -D
yarn add express-async-errors
npm install express-async-errors
yarn add yup
yarn add @types/yup -D
npm install yup
npm install @types/yup -D
yarn add cors
yarn add @types/cors
npm install cors
npm install @types/cors
mkdir server
cd server
yarn init -y
yarn add express
yarn add @types/express -D
yarn add typescript -D
yarn tsc --init
yarn add ts-node-dev -D
yarn ts-node-dev --transpile-only --ignore-watch node_modules src/server.ts
yarn add typeorm sqlite3
yarn ts-node-dev ./node_modules/typeorm/cli.js migration:create -n create_orphanages_table
yarn ts-node-dev ./node_modules/typeorm/cli.js migration:create -n create_images_table
yarn ts-node-dev ./node_modules/typeorm/cli.js migration:run
yarn ts-node-dev ./node_modules/typeorm/cli.js migration:revert
yarn add multer
yarn add @types/multer -D