Skip to content

Blog app with Astro ๐Ÿš€ on the front and Go ๐Ÿน on the back

License

Notifications You must be signed in to change notification settings

takanome-dev/astro.go.blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

87 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Astro Blog with Golang

GitHub license CodeQL Action

๐Ÿšง Status ๐Ÿšง

This blog app is currently early in the development cycle. It's not yet functional but is being actively developed.

If you like this project, please leave a star โญ It's free and helps a lot!
Screenshots

๐Ÿ–ฅ๏ธ Local development

Prerequisite

You will need to have installed the following:

Once you have installed the prerequisites, you can follow the steps below to start the app locally.

Step 1: Fork the repo on GitHub.

Step 2. Clone your forked repository to your local machine.

# using https
git clone https://github.com/<your_username>/astro.go.blog.git

# using ssh
git clone git@github.com:<your_username>/astro.go.blog.git

Step 3. Navigate to the cloned directory and install the dependencies.

cd astro.go.blog

# install dependencies for the client
cd client && pnpm install

# install dependencies for the server
cd server && make install

Step 4. Create a .env file

# create a .env file for the client
cd client && cp .env.example .env

# create a .env file for the server
cd server && cp .env.example .env

Replace the placeholder values in the .env file with your own values.

Step 5. You will need to run the migrations to create the database tables.

# first, create a database called `blog` or whatever you want to call it
# run `psql` to open the postgres shell
psql

# create the database
CREATE DATABASE blog;

# exit the shell
\q

# --------------------------------- OR ---------------------------------
# you can also use a GUI tool like pgAdmin to create the database
# --------------------------------- \ ---------------------------------

# run the migrations
cd server && make migrate DB_URL="<your_database_url>"
# i.e. make migrate DB_URL="postgres://<user>:<pwd>@localhost:5432/blog"

See the next section for how to run the migrations using Docker (easier).

Step 6. Run the development server.

# run the client
cd client && pnpm dev

# run the server
cd server && make run

This will start the web app at http://localhost:4321 and the server at http://localhost:5000.

๐Ÿณ Running the migrations with Docker

(TODO: Add instructions for running the client with Docker)

๐Ÿค Contributing

We welcome contributions of all sizes, from small bug fixes to new features. Just check out the open issues and pull requests to see where you can make an impact. Don't forget to read our Contributing Guide to learn how you can get involved.

โš–๏ธ License

The scripts and documentation in this project are released under the MIT LICENSE