Skip to content

gregidonut/scumjournal

Repository files navigation

My first legitimate blog, I plan to use this as a portfolio that showcases the technologies I have a solid grasp on.

Specs

Front-end

Framework: Qwik
Languages:

  • TypeScript
  • HTML
  • CSS

Deployment:

Back-end

Framework: Serverless
Language: Go
Deployment: AWS Lambda

Database

MongoDB
Deployment: MongoDB Atlas

Current Business Logic

Essentially, what's happening is when you go the website, it contacts the API to my Go function which then sends back a json array of all the blogs in descending order according to the postNumber

Sorting is done by Go in the function and not through the database query(I think database queries should be as simple as possible so).

Try it out locally.

To reproduce the whole app locally(all except for the MongoDB uri to my db instance),

  • Clone the repo
    git clone https://github.com/gregidonut/scumjournal.git
  • cd into the front end dir
    cd scumjournal/scumjournal
  • install npm dependencies
    npm install
  • execute the start script
    npm start

from there the front end should pop up with Vite and you can either add an array of TypeScript objects that matches the microBlogArticle interface, or you can upload the array of said objects to MongoDB Atlas and then create a serverless function through AWS Lambda to access it,

by,

  • CDing back to repo root dir

    cd ..
  • CD into the scumjournal-backend dir

    cd scumjournal-backend
  • create your serverless.yml (you can also just use mine).

  • cd back out to the root of the repo coz that's where the go.mod file is to tidy then back in

    cd ..
    go mod tidy
    cd scumjournal-backend
  • build the Go bin

    export GO111MODULE=on
    env GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/microBlogArticlesDatabase microBlogArticlesDatabase/main.go
  • deploy

    sls deploy --verbose
  • make sure to add the url to your AWS Lambda api to the fetch request in the microBlogArticles component

About

first blog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors