Git Product home page Git Product logo

react-vite-ts's Introduction

React (with vite and typescript)

React (with vite and typescript)

I have been using Next.js since 2018 in production. However, I am annoyed with their ever-growing do everything bs. So, I created this simple React application template that supports:

  • Server side and client side rendering, as well as static site generation (a.k.a. pre-rendering)
  • File-based routing (nested)

A React app template to help you get started with React + Vite + TypeScript.

Getting started

$ git clone https://github.com/th0th/react-vite-ts.git
$ cd react-vite-ts
$ pnpm install
$ pnpm run dev

Running

Development

Vite support Hot Module Reloading (HMR) out of the box.

  1. Install dependencies

    $ pnpm install
  2. Run development server

    $ pnpm run dev

    Then the application should be accessible on http://localhost:5173.

Production

You have 3 choices for running the application in production environment.

  1. Server side rendering

    $ pnpm install
    $ pnpm run build
    $ pnpm run serve
  2. Client side rendering

    $ pnpm install
    $ pnpm run build:client

    Then you can use any kind of web hosting service, and upload the contents of the dist/client directory.

  3. Static site

    $ pnpm install
    $ pnpm run generate

    Then again, you can use any kind of web hosting service, and upload the contents of the dist/static this time.

Shameless plug

I am an indie hacker, and I am running two services that might be useful for your business. Check them out :)

WebGazer

WebGazer

WebGazer is a monitoring service that checks your website, cron jobs, or scheduled tasks on a regular basis. It notifies you with instant alerts in case of a problem. That way, you have peace of mind about the status of your service without manually checking it.

PoeticMetric

PoeticMetric

PoeticMetric is a free as in freedom, open source, privacy-first and regulation-compliant website analytics tool.

No cookies or personal data collection. So you don't have to worry about cookie banners or GDPR, CCPA, and PECR compliance.

License

Copyright © 2023, Gökhan Sarı. Released under the MIT License.

react-vite-ts's People

Contributors

th0th avatar

Watchers

 avatar

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.