![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/ada-social-network/api
Manage resources for the Ada Social Network.
The application can be run using docker-compose:
docker-compose up
More details in the Docker Compose section.
The application can be used with the following command:
./ada-api
if you need help use the following command:
./ada-api --help
Usage of ada-api:
-auth
Use api authentication (default true)
-graceful-timeout duration
the duration for which the server gracefully wait for existing connections to finish - e.g. 15s or 1m (default 15s)
-http-host string
Default interface (default "0.0.0.0")
-http-port int
Default port (default 8080)
-mode string
Running mode, can be 'debug', 'release' or 'test' (default "release")
-sqlite-dsn string
sqlite database file (dsn) that will store data (default "gorm.db")
-version
Show application current version
CORS is disabled by default. it means that all request should have the same domain as the API.
In order to use another domain, it is possible to activate CORS by passing to command arguments an allowed domain.
For example:
# Allow request from adahub.com (for example)
./ada-api --allowed-domain="https://adahub.com"
For development, you can also allow all domain (useful for accepting any request from any domain):
# Allow all
./ada-api --allowed-domain="*"
# Or specific front-end
./ada-api --allowed-domain="http://localhost:3000"
You can also use a CORS plugin (see Chrome Store for a CORS Plugin) in order to allow Cross domain request during development. For example : https://chrome.google.com/webstore/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf
golangci-lint run
go fmt ./...
go build -o ada-api .
go run .
go run . --mode=debug
go test ./...
golangci-lint run
go test ./...
go build -o ada-api .
./scripts/release.sh v1.0.0
More info about version here: semantic versionIn order to ensure that your commits are valid, you can install our hooks using the following command:
ln -s ../../.githook/pre-commit .git/hooks/pre-commit
Lints are performed by Golang CI Lint with the configuration in .golangci.yml
golangci-lint is a fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config, has integrations with all major IDE and has dozens of linters included.
More info, here: https://golangci-lint.run
ghcr.io/ada-social-network/api
latest
: latest version of the imagelatest
docker imageYou can get the last image of the api using docker pull
.
For example:
docker pull ghcr.io/ada-social-network/api:latest
if you don't have the image locally or if the local image is outdated you will have a stdout like that:
latest: Pulling from ada-social-network/api
Digest: sha256:3eb90ac5515e0acf8d3829ec1c860c5c231e204fc3d5747d085800c5cfd6e1c3
Status: Downloaded newer image for ghcr.io/ada-social-network/api:latest
ghcr.io/ada-social-network/api:latest
if you already have the image locally you should have a stdout like that:
latest: Pulling from ada-social-network/api
Digest: sha256:3eb90ac5515e0acf8d3829ec1c860c5c231e204fc3d5747d085800c5cfd6e1c3
Status: Image is up to date for ghcr.io/ada-social-network/api:latest
ghcr.io/ada-social-network/api:latest
You can run the image and bind:
8080
) to the container port (e.g. 8080
) for accessing the container through your machine# run latest
docker run --rm -p 8080:8080 ghcr.io/ada-social-network/api
if you want to reuse your local file gorm.db in the container you can run:
docker run -p 8080:8080 -v $PWD/gorm.db:/usr/local/ada/data/gorm.db ghcr.io/ada-social-network/api
you can add extra flags like that:
# add flag for getting help
docker run ghcr.io/ada-social-network/api --help
# add flag for debug mode
docker run ghcr.io/ada-social-network/api --mode=debug
In order to simplify the use of the api you can use docker-compose.
For example:
# start the application in docker-compose attached mode, you can interrupt the process with CTRL+C
docker-compose up
# start the application in docker-compose detached mode(run in the background)
docker-compose up -d
# stop the application
docker-compose stop
# remove stopped application
docker-compose rm
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.