Git Product home page Git Product logo

nlw3's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.