sveltejs / realworld

SvelteKit implementation of the RealWorld app
https://realworld.svelte.dev
MIT License
2.23k stars 353 forks source link

Add use of .env files for dev and prod evvironment #160

Closed alokmahor closed 1 year ago

alokmahor commented 1 year ago

In src/lib/api.js https://api.realworld.io/api should come from .env file.

benmccann commented 1 year ago

Why? Is there some different URL you would use for development vs production? What is that URL?

alokmahor commented 1 year ago

Why? Is there some different URL you would use for development vs production? What is that URL?

Its a example project. So to show example usage of .env files in sveltekit.

benmccann commented 1 year ago

If the URL is going to be the same I'm not sure that's a good example

alokmahor commented 1 year ago

If the URL is going to be the same I'm not sure that's a good example

This is a example project. People are using this project to see way to use sveltekit and its library functions in real word scenario.