Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ndrean/gruland

NPM AWS package && serverlessland example-patterns
https://github.com/ndrean/gruland

aws elixir javascript universal-router zustand

Last synced: 6 days ago
JSON representation

NPM AWS package && serverlessland example-patterns

Awesome Lists containing this project

README

        

# Gruland

Accessible via:

A backend to serve the statistics on AWS package from NPM is deployed on fly.io (`curl https://gruland.fly.dev/api/packages?p="@grucloud"`)

```bash
> fly deploy
```

## JSON files (Elixir)

1/ To build the examples,

- fork the repo .
- open an IEx session and run `Builder.run`. It will read all the directories and extract the "example-pattern.json" files, and concat into a new file for the front to render it.

In a terminal run:

```bash
mix deps.get
iex -S mix
```

This open an IEx session. Then run:

```elixir
iex> Builder.run
```

This creates a file "serverlessland-examples.json"

2/ The NPM packages are served by a deployed app. You can `curl https://gruland.fly.dev/api/packages?p="mypackage"` or use the front-end `https://gruland.surge.sh` to get them.

The file "aws-npm-packages.json" is created if you set `true`. This can only be done in the terminal locally where you can also set "starting" and "ending" query period.

```elixir
$ iex -S mix
iex> Npm.find(true, "@aws-sdk/client", "2022-01-01", "2023-01-01")
```

3/ Sources:
The official list of AWS NPM packages is:

The NPM api can be found at: and a "search" endpint (paginated per 25).

4/ Results for AWS JS packages in 2022:

Total downloads in 2022 per package:

Screenshot 2023-03-11 at 01 42 08

Detail of downloads per package in 2022:

Screenshot 2023-03-11 at 01 44 37

The code of AWS NPM packages can be run in a Livebook.

[![Run in Livebook](https://livebook.dev/badge/v1/blue.svg)](https://livebook.dev/run?url=https://github.com/ndrean/gruland/blob/main/livebook.livemd)

## Front

Vite generate Preact + Universal-Router + Zustand

Package.json:

```json
"dependencies": {
"history": "^5.3.0",
"preact": "^10.11.3",
"universal-router": "^9.1.0",
"zustand": "^4.3.6"
},
```

Erase "React" in the "node_modules".

Visible at: