diff --git a/.gitignore b/.gitignore index c882994f54..3f187cd4f2 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +_config/_goAPI/vendor +_config/_goAPI/assets diff --git a/README.md b/README.md index bdb1d30498..ea52a7cdf6 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,27 @@ Currently the API/CDN endpoint is at: https://assets.smold.app/api/token/[chainID]/[tokenAddress]/[fileName].[ext] ``` +## Usage + +It's recommanded to use PNG files. They are smaller and faster to load, come in two sizes (32x32 and 128x128) and are supported by all browsers. +SVG files are also available, but they are larger and slower to load and can hurt performances for poorly optimized assets or very complex ones (ex: curvefi icon). + +## (Self) Hosting + +The repo comes with two different server systems in `_config`: +- a `golang` server, that serve the assets from github +- a `node` server, configured to work with Vercel. If you want to self host, here is the config we are using: +``` +Framework Preset: Next.js +Build Command: yarn --cwd _config/nodeAPI/ run build +Output Directory: _config/nodeAPI/.next +Install Command: yarn install && yarn --cwd _config/nodeAPI/ install +Development Command: next +Node Version: 18.x +Environment Variables: None +``` + + ## Contributing You will need an SVG file of the logo of the asset. You can use