gouweb

command module
v0.9.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 4 Imported by: 0

README

gouweb

is a go web framework

  1. Installation and Setup
  2. First run
  3. Gouweb cli
  4. If you renamed root directory of project
  5. Migrations
  6. Initialize svelte project

1. Installation and setup

in your go path directory in src create folder gouprojs than clone repository to this directory

you can copy this commands:

cd $GOPATH/src/<your default path to projects(gihthub.com/example/)>
git clone https://github.com/MikhailBatsin-code/gouweb.git
cd gouweb
go build(will make cli binary)
./gouweb cli

2. First run

if you will try to run executable you will see error that tells you that there is no table test. You can remove model from modelslist in file framework/database/models/modelslist.go or run "mig:run:all" command in gouweb cli

3. gouweb cli

gouweb cli takes only one argument per call you can use build(it will build project) or cli(it will activate interactive mode)

4. If you renamed root directory of project

you can enter cli and type proj-rename. You will be prompted to enter new project name. Enter your current name of root directory. Next program will ask you to enter old project name. if it was just copied from git repository type gouweb. after that your imports will be updated

5. Migrations

first create it in cli than implement methods and put migration instance to miglist.go, than recompile cli and run in it mig:run:all

6. Models

create model in cli:

model:create

than add it to modelslist.go file and use it

7. Initialize svelte

type in cli:

ui:svelte

than add to bootstrap.go plugin compileSvelte. It will compile your svelte you will get www/static/js/bundle.js and www/static/css/bundle.css import it to your html file:

<link rel="stylesheet" href="/static/build/bundle.css">

<script src="/static/build/bundle.js"></script>

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL