![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/moosecanswim/go-contacts
Based on tutorial located here https://medium.com/@adigunhammedolalekan/build-and-deploy-a-secure-rest-api-with-go-postgresql-jwt-and-gorm-6fadf3da505b
To run the basic server defined run defined in main.go
use the following command:
go run main.go
Go to http://localhost:10000/
You will see the following:
<p> W </>lcome to the HomePage </p>
That means its up and running on port 10000. This is defined in main.go
'shomePage()
function.
While in the same directory:
- To start this use `docker-compose up`. That will show the logs/ output from println. To run in backgrount append `-d` to the above command.
- To STOP run `docker-compose down`
To make this a dynamic development process i used go-watcher and docker-compose to create an isolated environment.
services:
contacts:
image: canthefason/go-watcher:latest
container_name: 'contacts'
ports:
- '8080:10000'
environment:
STAGE: 'docker-compose-land'
volumes:
- ~/go/src/github.com/moosecanswim/go-contacts:/go/src/github.com/moosecanswim/go-contacts
command: watcher -run github.com/moosecanswim/go-contacts --config github.com/moosecanswim/go-contacts/settings.toml --watch github.com/moosecanswim/go-contacts
This docker-compose definition uses the canthefason/go-watcher
image and volume mounts the directory that can change. This means that any changes located in $PWD/go-contacts
directory will result in the docker container being rebuilt.
To use this environment run docker-compose up
. This will spin up the containers defined in docker-compose.yaml
. Check that it is working at localhostt:8080
.
You might be wondering why this has a different port than in the Basic Development section. Well, in the contacts
service we map the 8080 port on the host (your computers) port to the containers 10000 port.
Self explanatory
// Define struct of contacts
type Contact struct {
First string `json:"first"`
Last string `json:"last'`
Email string `"json: email"`
}
// Declare global Contacts array (simulation database)
var Contacts []Contact
To create an entry follow this (node the capitalized parts) :
Contact{First: "Test FirstName:", Last: "Test LastName:", Email: "Test Email:"},
Update the main.go
main() do define two struct entries: kyle and dan
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.