MagicalStrangeQuark / NLW3

Repository containing the application created in the third edition of the Rocketseat NLW event.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NLW3

Repository containing the application created in the third edition of the Rocketseat NLW event.

License License License License

πŸ” Installing WEB Application

    yarn create react-app web --template typescript
    npx create-react-app web --template typescript

πŸ” Typescript Installation

    sudo npm install -g typescript

πŸ” Check the installation

    tsc --help

πŸ” To compile our typescript code, located in index.ts, to javascript

    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

πŸ” Run javascript script

    node index.js

πŸ” Icons

    yarn add react-icons
    npm install react-icons

πŸ” React Router DOM

    yarn add react-router-dom

    yarn add @types/react-router-dom -D
    npm install react-router-dom

    npm install @types/react-router-dom -D

πŸ” Leaflet

    yarn add leaflet react-leaflet

    yarn add @types/react-leaflet -D
    npm install leaflet react-leaflet

    npm install @types/react-leaflet -D

πŸ” Express Async Errors

    yarn add express-async-errors
    npm install express-async-errors

πŸ”Yup

    yarn add yup

    yarn add @types/yup -D
    npm install yup

    npm install @types/yup -D

πŸ” Cors

    yarn add cors

    yarn add @types/cors
    npm install cors

    npm install @types/cors

πŸ” Server

    mkdir server

    cd server

    yarn init -y

πŸ” Express

    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

πŸ” SQLite

    yarn add typeorm sqlite3

πŸ” Create Migrations

    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

πŸ” Run Migrations

    yarn ts-node-dev ./node_modules/typeorm/cli.js migration:run

πŸ” Revert Migrations

    yarn ts-node-dev ./node_modules/typeorm/cli.js migration:revert

Multer

    yarn add multer

    yarn add @types/multer -D

About

Repository containing the application created in the third edition of the Rocketseat NLW event.

License:MIT License


Languages

Language:TypeScript 76.6%Language:CSS 14.5%Language:HTML 7.4%Language:Shell 1.5%