npm run setup
npm start
alternatively you can also:
npm run frontend:dev # or just npx vite
and
npm run backend:dev
in two separate process
because prisma won't work on NixOS, I created docker files s.t. it works on any machine (even on Windows, if set up properly). to run docker, just run
docker compose build --no-cache
docker compose up
. service will be available on localhost:3200.
run docker exec -it (docker name - use docker ps to check) sh
to enter interactive shell within the docker container.
example: docker exec -it uplace-uplace-1 sh
run npm test
and make sure that it's running
releasing will be automatically done after updating branch release
. make sure main is working before merging to release.
do NOT touch files inside these 3 directories. they will be overwritten. ./node_modules/ ./tsc-dist/ ./vite-dist/
during build process,
- backend ts files will be transpiled to js files and will be put in ./tsc-dist/
- (if release mode, ) frontend JSX will be transpiled to pure JS and will be put in ./vite-dist/
and to provide,
- (dev mode) Node.js runs ./tsc-dist/main.js and Vite directly runs frontend directory. there is duplicate static server in ./tsc-dist/main.js that also serves frontend files, but it's ok because it's dev mode anyways
- (release mode) Node.js runs ./tsc-dist/main.js. this also statically serves files in ./vite-dist/
- write .env.production for prod env
- fix vite build not working
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptions
property like this:
export default {
// other rules...
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.json", "./tsconfig.node.json"],
tsconfigRootDir: __dirname,
},
};
- Replace
plugin:@typescript-eslint/recommended
toplugin:@typescript-eslint/recommended-type-checked
orplugin:@typescript-eslint/strict-type-checked
- Optionally add
plugin:@typescript-eslint/stylistic-type-checked
- Install eslint-plugin-react and add
plugin:react/recommended
&plugin:react/jsx-runtime
to theextends
list