{"id":13551066,"url":"https://github.com/aerth/cosgo","last_synced_at":"2025-09-19T01:45:58.225Z","repository":{"id":95082596,"uuid":"51563973","full_name":"aerth/cosgo","owner":"aerth","description":":pencil: Experimental (broken?) Contact Form Server. Saves to local .mbox file... Option for GPG, SendGrid. Easy Heroku deployment. ","archived":false,"fork":false,"pushed_at":"2024-06-21T22:05:48.000Z","size":980,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-09T11:10:31.858Z","etag":null,"topics":["contact","contact-form","gnupg","gpg","server","webform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aerth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-12T03:00:42.000Z","updated_at":"2024-06-21T21:27:28.000Z","dependencies_parsed_at":"2024-08-01T12:18:48.726Z","dependency_job_id":"219f8714-710b-488b-8b7e-69baaf970f3a","html_url":"https://github.com/aerth/cosgo","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/aerth/cosgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerth%2Fcosgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerth%2Fcosgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerth%2Fcosgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerth%2Fcosgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aerth","download_url":"https://codeload.github.com/aerth/cosgo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerth%2Fcosgo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262460371,"owners_count":23314722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contact","contact-form","gnupg","gpg","server","webform"],"created_at":"2024-08-01T12:01:41.885Z","updated_at":"2025-09-19T01:45:53.151Z","avatar_url":"https://github.com/aerth.png","language":"Go","funding_links":[],"categories":["Go","server"],"sub_categories":[],"readme":"## cosgo\nwhen all you needed was a contact form, anyways.\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/aerth/cosgo)](https://goreportcard.com/report/github.com/aerth/cosgo)\n\n* Save the mail: Contact form saves messages to a local .mbox file\n* Read the mail with something like: `mutt -Rf cosgo.mbox`\n* Option to send mail using Sendgrid\n* Option to use GPG for encrypting the messages\n* Customize: Uses two Go style templates, `templates/index.html` and `templates/error.html`\n* Static Files: /sitemap.xml /favicon.ico, /robots.txt. Extensions limited to .woff, .ttf, .css, .js .png .jpg and custom -ext flag\n* Easy to convert static web sites to cosgo theme.\n* No database, from no log to (very verbose) debug log\n* No dependencies. Runs 'out of the box'\n\n```\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 aerth\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n```\n\n## Usage Examples\n\n\tFirst, cd into a new empty directory such as $HOME/cosgo, \n\tthis will allow you to easily see which files cosgo creates on boot.\n\n```\ncosgo -h # show flags\ncosgo # normal boot and serve\ncosgo -debug # more verbosity\ncosgo -nolog -quiet # no output whatsoever\ncosgo -bind 127.0.0.1 -port 8000 # nginx or hidden service setup (bind only to localhost)\ncosgo -bind 0.0.0.0 -port 8000 # listen and serve (bind to all interfaces)\ncosgo -gpg publickey.asc # loads publickey.asc into memory\n\n```\n\nSee newest version in action! It is automatically deployed at https://cosgo.herokuapp.com/\n\n-------\n\n## Installation\n\nReleases:\n\n1. Extract the archive.\n2. Copy the binary to /usr/local/bin/ ( or extract everything to C:/cosgo/ )\n3. Run `cosgo` from the command line. This will listen on all interfaces, port 8080 and create static/templates directories.\n4. Edit templates, static files\n\nBuilding from source:\n\n```\n# Grab latest source code ( also check https://isupon.us for more info )\ngit clone https://github.com/aerth/cosgo.git \u0026\u0026 cd cosgo\n# make deps # optional, cosgo comes with vendor directory.\n# Build a static binary\nmake\n\n# Install to /usr/local/bin/cosgo\nsudo make install\n\n```\n\n-------\n\n## Theme\n\nCustomize the theme by modifying ./templates/index.html and ./templates/error.html\nIncluded in the binary is the *bare minimal* and is not intended to look very fancy.\nIf they don't exist, the templates and static directories will be created where you run cosgo from. (since v0.9)\nYou can upload your static .css .js .png .jpeg .woff and .ttf files in ./static/foldername/file\nYou can include them in your templates as /static/{foldername}/whatever.css\nThey will be available like any typical static file server. \nSome web design themes look in /assets, which won't be served by cosgo. You can use the -static flag to change this.\n\nCopy favicon.ico into static/. it will be served as if it were located at /favicon.ico\n\nAlso copy robot.txt into static/, it will be served at /robots.txt\n\n/static\n/static/js/jquery.js\n/static/css/style.css\n/static/favicon.ico\n/static/robots.txt\n\n/templates/index.html\n/templates/error.html\n\n-------\n\n## cron\n```cron\n\nCOSGO_DESTINATION=your@email.com\nCOSGOPORT=8080\n\n@reboot /demon/$USER/cosgo -port $COSGOPORT\u003e /dev/null 2\u003e\u00261\n\n```\n\n-------\n\n\n## Sample Nginx Config\n\n```nginx\nserver {\n        server_name default_address example.com example.net;\n        listen 80;\n        location / {\n        proxy_pass http://127.0.0.1:8080; # Change to your cosgo port\n        }\n}\n\n```\n\n## Fortunes\n\nCosgo now has a random fortune for each visitor.\nDefault is disabled.\nTo enable it, make a file called \"fortunes.txt\" with **double-line separated pre-formatted text.**\n\nSuch as\n\n```\nWelcome!\n\n\nWelcome!!\n```\n\t \nHere is a `shell` script that populates the file with standard unix \"fortune\" command.\n```\n\n#!/bin/sh\n# double line separated fortunes. some get cut off but oh well.\necho \"Populating fortunes.txt, press Ctrl C when you think its big enough.\"\nfor i in $(cat fortunes.txt); do \nfortune -o \u003e\u003e fortunes.txt \u0026\u0026 echo \"\" \u003e\u003e fortunes.txt;\n\n```\n\n# More information at Wiki\n\nMore code examples at https://github.com/aerth/cosgo/wiki\n\nPlease add your use case. It could make cosgo better. Report any bugs or feature requests directly at https://isupon.us\n\n-------\n\n### Historical Information\n\n* Casgo is short for \"Contact API server in Golang\"\n* Turns out theres another casgo. Now this is cosgo.\n* Cosgo is still not to be confused with Costco, the warehouse-style superstore.\n* It began as a fork of https://github.com/munrocape/staticcontact\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faerth%2Fcosgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faerth%2Fcosgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faerth%2Fcosgo/lists"}