Sign inSign up

heyimtcn/vlang

By heyimtcn

•Updated about 2 years ago

Image for deploying V based apps on the cloud.

Image
Languages & frameworks
0

10K+

heyimtcn/vlang repository overview

EXAMPLE:

File structure:

šŸ“ scripts
  šŸ“„ server.v
šŸ‹ Dockerfile

server.v:

import veb

pub struct App {}

pub struct Context {
	veb.Context
}

pub fn (mut app App) index(mut ctx Context) veb.Result {
	return ctx.text('Hello World!')
}

fn main() {
	mut app := &App{}
	veb.run[App,Context](mut app,8080)
}

Dockerfile:

FROM heyimtcn/vlang:latest

WORKDIR /app

RUN mkdir bin

COPY scripts scripts

RUN v -o bin/server scripts/server.v

EXPOSE 8080

ENTRYPOINT bin/server

Tag summary

Content type

Image

Digest

sha256:ae4c3c379…

Size

311 MB

Last updated

about 2 years ago

docker pull heyimtcn/vlang