GithubHelp home page GithubHelp logo

chatter-stock's Introduction

Stock chat

Docker

docker build -t chatter-stock .

docker run -it --rm -p 5051:5050 chatter-stock

To see all running containers we can use the command inside another terminal.

docker ps

Set environment variables:

mysql_users_username youruser

mysql_users_password yourpassword

mysql_users_host 127.0.0.1

mysql_users_schema users_db

	CREATE TABLE `users_db`.`users` (
	  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
	  `first_name` VARCHAR(45) NULL,
	  `last_name` VARCHAR(45) NULL,
	  `email` VARCHAR(45) NOT NULL,
	  `date_created` VARCHAR(45) NULL,
	  `status` VARCHAR(45) NULL,
	  `password` VARCHAR(45) NULL,
	  PRIMARY KEY (`id`),
	  UNIQUE INDEX `email_UNIQUE` (`email` ASC));


	SELECT * FROM users_db.users;

Postman Rest:

	CREATE USER

	curl --location --request POST 'localhost:8080/users' \
	--header 'Content-Type: application/json' \
	--data-raw '{
		"first_name": "Luciano",
		"last_name": "Ferrari",
		"email": "[email protected]",
		"password": "password1"
	}'

To connect to the database if you are using visual studio code, add this in launch.json

	{
	    "name": "Launch",
	    "type": "go",
	    "request": "launch",
	    "mode": "auto",
	    "program": "${workspaceFolder}/main.go",
	    "env": {"mysql_users_username":"root","mysql_users_password":"","mysql_users_host":"127.0.0.1:3306","mysql_users_schema":"users_db"},
	    "args": []
	}

chatter-stock's People

Contributors

ferralucho avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.