Giter Site home page Giter Site logo

fr3ndyl33 / express-blog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bertzzie/express-blog

0.0 2.0 0.0 140 KB

Blog engine sederhana yang dibangun dengan menggunakan NodeJS dan ExpressJS sebeagai bahan pembelajaran.

JavaScript 54.67% CSS 17.59% HTML 27.75%

express-blog's Introduction

Blog Engine Sederhana

Repository ini berisi contoh implementasi blog engine sederhana dengan NodeJS dan ExpressJS. Commit yang ada di repository memperlihatkan perkembangan kode, tahap demi tahap, yang bisa juga dijadikan bahan pembelajaran.

Untuk melihat seluruh commit yang ada gunakan perintah:

$ git log

Kalau ingin melihat seluruh isi file pada commit tertentu, jalankan perintah:

$ git checkout <nomor-commit>

Misalnya untuk melihat commit paling pertama:

$ git checkout 03c7f40

Kalau mau kembali ke kode terbaru, checkout ke HEAD:

$ git checkout HEAD

Jika ingin melihat seluruh nomor commit yang ada dengan lebih mudah, gunakan perintah:

$ git log --oneline

Dependencies

Sebelum bisa menjalankan blog, pastikan beberapa hal telah ada:

  1. Database MySQL atau MariaDB, dengan model tabel sesuai dengan yang ada pada pada direktori data.

  2. Environment variabel berikut dikonfigurasikan:

    a. MARIADB_HOST, berisi hostname dari sistem basis data. b. MARIADB_USER, berisi pengguna yang dapat mengakses basis data. c. MARIADB_PASSWORD, berisi password pengguna pada (b). d. MARIADB_DB_BLOG, berisi nama basis data yang akan digunakan.

Dari sisi NodeJS, sebelum memasang dependency melalui npm, terlebih dahulu jalankan perintah berikut (pada Windows):

$ npm install -g gulp
$ npm install -g node-gyp

untuk pengguna Linux dan Mac, gunakan sudo:

$ sudo npm install -g gulp
$ sudo npm install -g node-gyp

Setelah perintah selesai dieksekusi, pasang dependency dengan perintah:

$ npm install

baik di Mac, Windows, ataupun Linux.

Menjalankan Blog

Hanya ada satu perintah untuk menjalankan blog, yaitu:

$ gulp server

Dan blog akan dapat diakses pada http://localhost:3000/.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.