openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.pem -days 3650
var prompt = require('prompt'); | |
var config = require('config'); | |
var peter = require('./peter.js'); | |
if(!config.has('app.promptSchema') || !config.has('app.google') || !config.has('peter')) { | |
throw "Error: Check your config."; | |
} | |
prompt.start(); |
#!/bin/bash | |
# | |
# chkconfig: 35 95 05 | |
# description: Hello world application. | |
# Run at startup: sudo chkconfig hello-world on | |
# Load functions from library | |
. /etc/init.d/functions |
# Make it executable | |
sudo chmod +x etc/init.d/myapp | |
# Try it: | |
sudo service myapp start | |
# Make it run upon boot: | |
sudo update-rc.d myapp defaults |
image: golang:1.8-alpine # The alpine builds are much smaller but lack tools we need, we'll add them later | |
stages: | |
- build | |
- test | |
before_script: | |
- apk --update --upgrade add git curl-dev openssh curl ca-certificates # This is how we add system dependencies. | |
# You may need less or more packages for your app. | |
- curl -sS https://glide.sh/get | sh | |
- mkdir -p /go/src/gitlab.com/ |
package main | |
import ( | |
"image" | |
_ "image/gif" | |
_ "image/jpeg" | |
_ "image/png" | |
"io" | |
"mime" |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func main() { |
go version | |
# Tested with: | |
# go version go1.17.6 linux/amd64 | |
# go version go1.18.3 linux/amd64 | |
pwd | |
# /tmp/go-test | |
go mod init example.com/user/go-test | |
# go: creating new go.mod: module example.com/user/go-test |