Skip to content

Instantly share code, notes, and snippets.

View HaiBV's full-sized avatar
🔥
Journeyman in craftsmanship

Harvey Bui HaiBV

🔥
Journeyman in craftsmanship
View GitHub Profile
@HaiBV
HaiBV / service.js
Created November 14, 2023 15:41 — forked from santospatrick/service.js
An example Service class wrapper for Axios
import axios from "axios";
class HttpService {
constructor() {
const token = window.localStorage.getItem("token");
const service = axios.create({
baseURL: process.env.REACT_APP_API_URL,
headers: token
? {
Authorization: `Bearer ${token}`,
@HaiBV
HaiBV / host-react-app-on-apache-server.md
Last active September 7, 2020 00:51 — forked from ywwwtseng/host-react-app-on-apache-server.md
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production