master |
This is the frontend for the OpenShock project that interfaces with the OpenShock API.
pnpm i
- Install dependenciespnpm run dev
- Start the development serverpnpm run build
- Build the projectpnpm run preview
- Preview the built projectpnpx openapi-generator-cli generate
- Generate the API client
To get started with development, you will need to have Node.js and pnpm installed.
We recommend using a version manager like Volta to manage your Node.js versions.
Install on Linux:
curl https://get.volta.sh | bash
Install on Windows:
winget install Volta.Volta
Then you can install the required Node.js and pnpm version by running a single command in the repository root directory:
volta install node
volta install pnpm
With Node.js installed, you can run the following commands to get started:
pnpm i
pnpm run build
Running the frontend locally is as simple as this:
pnpm run dev
If you do not have a hosts file config for your domain and try to run the project you will get the following example message:
Please ensure that local.openshock.app resolves to 127.0.0.1 in your hosts file
On macOS and Linux, you can do this by running the following command:
echo "127.0.0.1 local.openshock.app" | sudo tee -a /etc/hosts
On Windows, you can do this by running the following command in PowerShell as an administrator:
Add-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value "127.0.0.1 local.openshock.app"
Then restart your development server
This action is required because of cookie policy, once you have done this you should be set!
Try closing and re-opening your development environment or console to refresh its cached system config.
You can support the openshock dev team here: Sponsor OpenShock