Skip to content

Commit 40aaecc

Browse files
add env example & update readme
1 parent b47c157 commit 40aaecc

File tree

2 files changed

+31
-23
lines changed

2 files changed

+31
-23
lines changed

Diff for: .env.example

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
VITE_API_KEY=
2+
VITE_AUTH_DOMAIN=
3+
VITE_PROJECT_ID=
4+
VITE_STORAGE_BUCKET=
5+
VITE_MESSAGING_SENDER_ID=
6+
VITE_APP_ID=
7+
VITE_MEASUREMENT_ID=

Diff for: README.md

+24-23
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
1-
# create-svelte
1+
# install counter
22

3-
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
3+
A simple firebase + svelte project to count udroid installations.
44

5-
## Creating a project
5+
## Working
66

7-
If you're seeing this, you've probably already done this step. Congrats!
7+
- Svelte is used to create simple server side functions to increment the counter and return the current count.
8+
- vercel is used to deploy the serverless functions ( :heart: vercel )
9+
- Firebase to store the count and serve
810

9-
```bash
10-
# create a new project in the current directory
11-
npm create svelte@latest
11+
## Endpoints
1212

13-
# create a new project in my-app
14-
npm create svelte@latest my-app
15-
```
13+
|Endpoint| Description |
14+
|--|--|
15+
| `/count` | to increment the count and return the current count |
16+
| `/cur_count` | to return the current count |
1617

17-
## Developing
18+
> No extra parameters are required for the endpoints
1819
19-
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20+
## Usage
2021

21-
```bash
22-
npm run dev
22+
check out `.env.example` to create a `.env` file
2323

24-
# or start the server and open the app in a new browser tab
25-
npm run dev -- --open
26-
```
2724

28-
## Building
25+
```bash
26+
curl https://endpoints-url/count
27+
```
2928

30-
To create a production version of your app:
29+
returns a json response
3130

32-
```bash
33-
npm run build
31+
```cmd
32+
{"downloads":908}
3433
```
3534

36-
You can preview the production build with `npm run preview`.
35+
> Please don't spam the endpoints :pray:
36+
37+
## License
3738

38-
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
39+
MIT

0 commit comments

Comments
 (0)