- related technologies:
- vite - project starter
- react - UI framework
- Ant Design - UI component library
- Typescript - Programming Language
- React Goolge Maps - Typescript Map library : https://www.npmjs.com/package/@react-google-maps/api
- related api:
- Google Api Key - For Map Access
- Position Stack - For address query
- ipgeolocation.io - For Time Zone Api
- Create a .env file which copy from .env.example, input your key first
- Run
yarn
ornpm install
to install deps - Run
yarn dev
ornpm run dev
to start server - Go to
localhost:3000
Deploy notes:
add this code in index.html
<script>
var global = global || window;
var Buffer = Buffer || [];
var process = process || { env: { DEBUG: undefined }, version: [] };
</script>
add this code in main.js / main.ts
import { Amplify } from "aws-amplify";
Amplify.configure({});
add this code in vite.config.js
import resolve from "@rollup/plugin-node-resolve";
import { visualizer } from "rollup-plugin-visualizer";
export default ({ mode }) => {
...,
return defineConfig({
plugins: [
react(),
{
...resolve({
preferBuiltins: false,
browser: true,
}),
enforce: "pre",
apply: "build",
},
visualizer(),
],
define: {...},
});
};
Last, look carefully into the yaml file at amplify, especially in the yaml file of baseDir path