Giter Site home page Giter Site logo

Comments (14)

ctfrancia avatar ctfrancia commented on September 16, 2024 1

Alright, since you are creating it inside of docker you might need to create the 'chess-web'@'172.22.0.1' instead of localhost. I'm taking screen shots now.

from bcnchess.

ctfrancia avatar ctfrancia commented on September 16, 2024 1

I have mysql running on my machine not through anything like docker. No necessary variables needed

from bcnchess.

ctfrancia avatar ctfrancia commented on September 16, 2024

ok. I'll get on that this morning

from bcnchess.

ctfrancia avatar ctfrancia commented on September 16, 2024

I updated it. If there is anything that isn't clear let me know :)

from bcnchess.

akshay-nm avatar akshay-nm commented on September 16, 2024

I'll try it out today.

from bcnchess.

akshay-nm avatar akshay-nm commented on September 16, 2024

My go installation was messed up. I was able to fix it. But now I am getting an error:
Error 1045: Access denied for user 'chess-web'@'172.22.0.1' (using password: YES)
I am assuming this is related to the MYSQL setup.
I have added chess-web and test_bcnchess to the user table in my MYSQL docker container. But those are @localhost.
This IP address is different 172.22.0.1. Maybe I need to set up some more environment variables.
I tried using go run ./cmd/web -help but it throws the same error.

from bcnchess.

ctfrancia avatar ctfrancia commented on September 16, 2024

yes, if you look at the file db.setup.sql you'll see the SQL queries needed for the test user

from bcnchess.

ctfrancia avatar ctfrancia commented on September 16, 2024

sql commands*

from bcnchess.

akshay-nm avatar akshay-nm commented on September 16, 2024

I tried executing the file by copying the db.setup.sql file to the container, but I got a few errors.
I'll try the whole thing one more time, I'll attach errors if I get some. 😅

from bcnchess.

akshay-nm avatar akshay-nm commented on September 16, 2024

I am just using docker for MySQL server.
The process just fires up a fresh instance of MySQL server on port 3306. Rest of the app just runs on my pc (ubuntu).
Any particular environment variables you use for MySQL server?
Should the IP address of the application be same as localhost by default? Or are you using a different configuration.

from bcnchess.

akshay-nm avatar akshay-nm commented on September 16, 2024

I added the 'chess-web@'172.22.0.1' as a user in the database and it seemed to work because now I am getting a different error.
main.go:92: open ./tls/cert.pem: no such file or directory exit status 1

I am using go run ./cmd/web to run the app.

from bcnchess.

ctfrancia avatar ctfrancia commented on September 16, 2024

This is because in the ./tls is a where I have my private and public keys. You can create your own self signing certificate to run the https with the following:

  1. create a tls folder in the root folder (where you see cmd folder)
  2. cd into the tls folder
  3. fun the command: go run /usr/local/go/src/crypto/tls/generate_cert.go --rsa-bits=2048 --host=localhost

let me know if this works or not and then I'll update the README

from bcnchess.

akshay-nm avatar akshay-nm commented on September 16, 2024

i'll try this

from bcnchess.

ctfrancia avatar ctfrancia commented on September 16, 2024

updated readme

from bcnchess.

Related Issues (9)

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.