-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b47c157
commit 40aaecc
Showing
2 changed files
with
31 additions
and
23 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,7 @@ | ||
VITE_API_KEY= | ||
VITE_AUTH_DOMAIN= | ||
VITE_PROJECT_ID= | ||
VITE_STORAGE_BUCKET= | ||
VITE_MESSAGING_SENDER_ID= | ||
VITE_APP_ID= | ||
VITE_MEASUREMENT_ID= |
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 | ||
# install counter | ||
|
||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). | ||
A simple firebase + svelte project to count udroid installations. | ||
|
||
## Creating a project | ||
## Working | ||
|
||
If you're seeing this, you've probably already done this step. Congrats! | ||
- Svelte is used to create simple server side functions to increment the counter and return the current count. | ||
- vercel is used to deploy the serverless functions ( :heart: vercel ) | ||
- Firebase to store the count and serve | ||
|
||
```bash | ||
# create a new project in the current directory | ||
npm create svelte@latest | ||
## Endpoints | ||
|
||
# create a new project in my-app | ||
npm create svelte@latest my-app | ||
``` | ||
|Endpoint| Description | | ||
|--|--| | ||
| `/count` | to increment the count and return the current count | | ||
| `/cur_count` | to return the current count | | ||
|
||
## Developing | ||
> No extra parameters are required for the endpoints | ||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
## Usage | ||
|
||
```bash | ||
npm run dev | ||
check out `.env.example` to create a `.env` file | ||
|
||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
``` | ||
|
||
## Building | ||
```bash | ||
curl https://endpoints-url/count | ||
``` | ||
|
||
To create a production version of your app: | ||
returns a json response | ||
|
||
```bash | ||
npm run build | ||
```cmd | ||
{"downloads":908} | ||
``` | ||
|
||
You can preview the production build with `npm run preview`. | ||
> Please don't spam the endpoints :pray: | ||
## License | ||
|
||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. | ||
MIT |