Skip to content

Instantly share code, notes, and snippets.

View albertkimdev's full-sized avatar
🏠
Working from home

Albert Kim albertkimdev

🏠
Working from home
View GitHub Profile
image: node:latest # if this isn't here, then
# gitlab runners/ci thing doesn't know it exists
# basically this is like a docker image
# and you need to add all the depenencies
# required for this shit to run!
# here you define the stages
# build, test are stages
# once this is committed in the gitlab interface
# you'll see the stages in the pipeline running
image: node:latest # if this isn't here, then
# gitlab runners/ci thing doesn't know it exists
# basically this is like a docker image
# and you need to add all the depenencies
# required for this shit to run!
# here you define the stages
# build, test are stages
# once this is committed in the gitlab interface
# you'll see the stages in the pipeline running
@albertkimdev
albertkimdev / .gitlab-ci.yml
Created May 13, 2019 19:57
2nd stage of the gitlab config
# Specify which docker image to use
# We want Node because our app is using Node
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-an-image
image: node:latest
# Set the stages for the pipeline
# In this configuration, there are 3 stages for our pipeline: build, test, deploy
# If we want 2 stages we would put: build, deploy
# https://docs.gitlab.com/ee/ci/yaml/#stages
stages:
@albertkimdev
albertkimdev / .gitlab-ci.yml
Created May 13, 2019 17:56
An example of a gitlab ci/cd yaml file
# Specify which docker image to use
# We want Node because our app is using Node
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-an-image
image: node:latest
# Set the stages for the pipeline
# In this configuration, there are 3 stages for our pipeline: build, test, deploy
# If we want 2 stages we would put: build, deploy
# https://docs.gitlab.com/ee/ci/yaml/#stages
stages:
@albertkimdev
albertkimdev / index.js
Created May 13, 2019 16:57
Starting the startServer.js
const startServer = require("./startServer");
const port = process.env.PORT || 4000;
startServer().listen(port, () => {
console.log("server started on port 4000");
});
@albertkimdev
albertkimdev / startServer.js
Created May 13, 2019 16:56
A simple node/express server
const express = require("express");
var router = express.Router();
const startServer = () => {
console.log("Starting server...");
const app = express();
router.get("/", (req, res) => {
res.json({
name: "Steve",