Hi, all so while I am doing responsive web design I decided to build my own blog and I am kind of have happy with how it looks at the moment (front end) I used bootstrap, the issue, however, is I have no idea how to create a backend for my blog. Most answers on the internet seem to be pointing out I should create a database with PHP and SQL. Perhaps if you can take a look and give me recommendations on how to proceed, I would have preferred something that would allow me to use JS as it next on my learning path and I want to learn by doing. Thanks here is a link to the code pen of the project
codepen is not the place to build a full-stack app
the freecodecamp curriculum teaches JS as back-end language, it teaches the MERN stack where you have MongoDB, ExpressJS, ReactJS and NodeJS (where React is the front-end framework, and the rest is for backend)
Okay i understand , in this instance , do you have any pointers on how i can proceed ?
how far are you in the freecodecamp curriculum?
This might be slightly off topic and probably a bad answer considering that you sound like you just started your journey but I really really do feel the need to recommend you to remotely consider the Static Site Generator approach for blogs.
With a static site generator you won’t even need to pay for a server since you can host the static files for free on sites like Github Pages or Netlify with a custom domain.
The premise is that you write your posts in a markup language called “Markdown” and the software will generate static html files based on the contents of those files. There are some good tech out there:
- Gatsby (uses React)
- Next (same as above)
- Hugo (uses Go Templates in HTML and I think there’s some JS involved?)
- Jekyll (uses Ruby and Handlebars Templates)
- Hexo (uses NodeJS and Handlebars but the project is a bit abandoned and unpopular)
But if you reeeeeally want a backend language I guess PHP or Python + PostgreSQL or MySQL are a good place to start but you need to be smart with caching and Nginx/Apache config so the server’s CPU doesn’t overload if you hit a peak in concurrent visitors.
I think this is an excellent idea.
Goto a site like linode.com and setup a server instance.
Setup ssh keys (learn about it)
Log into it remotely via ssh
Install mysql 8.
Install php or node.
I recommend Centos8.
Okay thanks , i wanted to know what are my options.
@Taity045 You can totally do it. You will need CRUD functionality, create, read, update, and delete on the backend. To put everything together you will need the frontend: what the user sees, backend: a way to process the data, and a database: to store data. The easiest way to do it is use Sqlite3. It is a great database that is easy to learn and actually is very suitable for a lot of fullstack production applications. You can use a combination of
HTML + CSS (Bootstrap), Nodejs + Express, and Sqlite3
HTML + CSS (Bootstrap), Python + Flask, and Sqlite3.
Flask in the Python framework that helps Python connect to the web interface.
Express in the framework that helps people use Nodejs easier.
You can build you project on Heroku for free.