ITEC 225 Post

This is my personal website

I haven’t had the time to properly modify and flesh out this site, but I intend to in the future.

This post is an example of the type of blog content I intend to host on this site.

Some Examples

As an example, I could write a post about some code and show examples / snippets like below:

def a_function(some_parameter, some_parameter2):
    """Does some string manipulation with f strings
    """
    return_string = "Here is a cool trick in python 3.6 and above \n"
    return_string += "you can use what are called f strings\n"
    return_string += f"and put variables inline {some_parameter}, {some_parameter2}\n"

    return return_string

Or I could explain how a dockerfile works

# Pull from the base NodeJs image
FROM node

# Create a directory for your code to reside
RUN mkdir -p /my_shitty_code

# Copy in your code
COPY ./my_shitty_code /my_shitty_code

# Set a working directory for convenience
WORKDIR /my_shitty_code

# Set an environmnet variable
ENV CRASH_ON_LINE_1="False"

# Run your code when te program starts
CMD ["node", "shitty_code.js"]

And thats all there is to it

If you actually want to learn about dockerizing NodeJs applications you can take a look at the official nodejs page on the subject

Written on January 25, 2019