-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from nais/refactor_migration
Refactor migration
- Loading branch information
Showing
98 changed files
with
3,379 additions
and
1,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_API_USER_EMAIL="dev.usersen@example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
# create-svelte | ||
# Console frontend | ||
|
||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). | ||
## Development | ||
|
||
## Creating a project | ||
|
||
If you're seeing this, you've probably already done this step. Congrats! | ||
The following snippet contains the most important commands for development. | ||
|
||
```bash | ||
# create a new project in the current directory | ||
npm create svelte@latest | ||
npm install | ||
cp .env.example .env # Copy the example environment file | ||
npm run dev # Starts a development server on port 5173 | ||
|
||
# create a new project in my-app | ||
npm create svelte@latest my-app | ||
npm run check # Check for various issues | ||
npm run lint # Lint the code | ||
npm run format # Format the code (Or use a Prettier extension in your editor) | ||
``` | ||
|
||
## Developing | ||
## User | ||
|
||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
In production `api` uses oauth2 to authenticate users. | ||
In developmen | ||
|
||
```bash | ||
npm run dev | ||
### Local user override | ||
|
||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
``` | ||
When running locally, the frontend will proxy requests to the backend through a Vite Proxy. | ||
This proxy will add a special header for local development to specify which user to run as. | ||
|
||
## Building | ||
There's two well known users: | ||
|
||
To create a production version of your app: | ||
| User | Description | | ||
| --------------------------- | ---------------------------------------------------- | | ||
| `dev.usersen@example.com` | A user with tenant wide permissions, but owns a team | | ||
| `admin.usersen@example.com` | A user with all permissions | | ||
|
||
```bash | ||
npm run build | ||
``` | ||
You can specify which user to run as through `.env`. | ||
See `.env.example` for an example. | ||
|
||
You can preview the production build with `npm run preview`. | ||
### Using OAUTH | ||
|
||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. | ||
To use the oauth flow, you need to configure `api` with correct credentials, and the user has to exist in the database. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.