Skip to content

Instantly share code, notes, and snippets.

View esslamben's full-sized avatar
💬

Esslam esslamben

💬
View GitHub Profile
const mongoose = require('mongoose');
const Compressor = mongoose.model('compressor');
module.exports = app => {
const uri = '/api/compressor';
// Gets all compressors
app.get(uri, async (req, res) => {
@esslamben
esslamben / main.go
Last active March 23, 2019 19:47
main.go
package main
import (
"net/http"
rice "github.com/GeertJohan/go.rice"
"github.com/labstack/echo"
)
func main() {
@esslamben
esslamben / Dockerfile
Created March 23, 2019 23:57
Docker file setup for building a go server and compiling static assets into a single binary
# Step 0 - Run the web build and get bundle
FROM node:11.12-alpine
RUN apk add --update \
git \
&& rm -rf /var/cache/apk/*
WORKDIR /app
COPY /web/frontend/package.json /web/frontend/yarn.lock ./
@esslamben
esslamben / config.yml
Last active July 28, 2020 23:00
NPM Register
storage: ./storage
auth:
htpasswd:
file: ./htpasswd
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@*/*':
access: $all
@esslamben
esslamben / docker-compose.yml
Last active August 2, 2020 23:30
NPM Registry
version: '3.1'
services:
verdaccio:
image: verdaccio/verdaccio
container_name: "verdaccio"
networks:
- node-network
environment:
- VERDACCIO_PORT=4873
storage: ./storage
auth:
htpasswd:
file: ./htpasswd
max_users: -1
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'**':