Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/diegosantosws/cms

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/diegosantosws/cms

  • v0.0.0-20180727015020-6b602a7efc10
  • Source
  • Go
  • Socket score

Version published
Created
Source

cms

CMS USING Go!

System is just a content manager for sites with few pages. The installation part is being developed.

How it works

  • 1 - Create database and make the necessary user and password connections.
  • 2 - Create a username and password of type Admin.
  • 3 - Installation.
  • 4 - Just start using it on your website.

Installation

By default system runs on the port http://localhost:3000/

After creating the database, access the file conexao.go and change connection data for your username and password

URL: http://localhost:3000/install

After performing the install, set whether the system created the tables correctly, if not, you have created copy the code that is in the root and run in your database. after that, just access, the URL: http://localhost:3000/ enter your username and password.

Sending File

Example

func Upload(w http.ResponseWriter, r *http.Request) {
	r.ParseMultipartForm(32 << 20)
	files, handler, err := r.FormFile("uploadfile")
	if err != nil {
		fmt.Println(err.Error())
		return
	}
	defer files.Close()
	//fmt.Fprintf(w, "%v", handler.Header)
	//New name from file
	namenewFile := time.Now().Format("02012006150405") + handler.Filename

	f, err := os.OpenFile("assets/uploadfile/"+namenewFile, os.O_WRONLY|os.O_CREATE, 0666)
	if err != nil {
		fmt.Println(err.Error())
		return
	}
	defer f.Close()
	io.Copy(f, files)
	idcontent, err := strconv.Atoi(r.URL.Path[12:])
	if err != nil {
		fmt.Println(err.Error())
	}
	s := fmt.Sprintf("/conteudo/%d", idcontent)
	http.Redirect(w, r, s, 302)
}

FAQs

Package last updated on 27 Jul 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc