Svelte-Solid-Authn

Svelte Solid Authn

A Hello World in Svelte with Solid Authentication

Example Svelte app with Solid Authentication

This is a project template for Svelte apps. It lives at https://github.com/sveltejs/template-webpack.

Try it live

https://mellonscholarlycommunication.github.io/Svelte-Solid-Authn/public/

Quick install

Need:

Clone this code from github:

git clone https://github.com/MellonScholarlyCommunication/Svelte-Solid-Authn

Install the dependencies:

cd Svelte-Solid-Authn
npm install

Run the development server:

npm run dev

Navigate to localhost:8080.

Start from scratch

To create a new project based on this template using degit:

npx degit sveltejs/template-webpack svelte-app
cd svelte-app

Note that you will need to have Node.js installed.

Install dependencies

Install the dependencies...

cd svelte-app
npm install
npm install buffer @inrupt/solid-client-authn-browser @inrupt/solid-client dotenv-webpack

In the webpack.config.js add a fallback for the Buffer library:

resolve: {
    fallback: {
            "Buffer": require.resolve('buffer/'),
    }

Add the dotenv-webpack also:

const Dotenv = require('dotenv-webpack');

plugins: [
    ...
    ...
    new Dotenv(),
]

Add an env file with content:

REDIRECT_URL=http://localhost:8080/

...then start webpack:

npm run dev

Navigate to localhost:8080. You should see your app running. Edit a component file in src, save it, and the page should reload with your changes.

Deploying to the web

npm run build

And copy these files on your webserver.

Top categories

Loading Svelte Themes