Skip to content

accubits-tech/GolangBoilerPlate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

GolangBoilerPlate

This script file is for generating golang simple crud api template with mysql database connectivity.

Prerequisite

  1. Golang
  2. MySQL
  3. Git

Steps to run this script

  1. First clone this repo on your local machine.

  2. Then start this script file in your terminal by going to their path. To run the script just run this command "bash Goboilerplate.sh".

  3. After it will check the prerequisite is installed in your system or not if not then install all the prerequisite for you.

  4. In step 4 if everything is installed then it will give two options and you have to enter the no which is mentioned in front of them. List are

    1. New Project
    2. Add Module If you are doing first time always go with first one.
  5. In next step it will clone the rest api repo and ask you for the name of the folder for your project you can provide any name as per your need or your project name as well.

  6. In this step it will ask you for the git url in which repo you want to push the code. Example :- https://gitlab.com/$useranme/$projectname

  7. In this step it will ask you for the name of controller file or this can also be your module name.

  8. In this step it will ask you for your git username and password to push your code on your git repository.

  9. That's it and the sample rest api bioler plate is ready to use.

Steps for 2nd point.

  1. When you want to create another module in the same repository then again run this script and choose 2nd option.

  2. In first step it will ask you for the path of your repository just give the path up to your root folder. Example your folder is Test and it is located at home just provide path as /home/ubuntu/Test

  3. In this step it will ask you for new module name please provide the module name whic you want to create.

  4. In this last step it will ask you for the go.mod file module name and you have to provide your go.mod file module name.

  5. That's it the new module will be created with the given module name.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages