DEV Community

Agus Sudarmanto
Agus Sudarmanto

Posted on • Edited on

Simple as Build API using Strapi

Preparation:

  1. To install server Laragon/WAMP/XAMPP (Windows OS user)
  2. To install MySQL GUI go to https://www.heidisql.com/download.php
  3. To install NodeJS & NPM go to https://nodejs.org/en/download/

We will use this commands:

node -v
npm -v
npm install --global yarn
yarn --version
echo "create database strapi_db;" | mysql -uroot -p
yarn create strapi-app project-name
cd project-name
yarn develop
open http://localhost:1337/admin
Enter fullscreen mode Exit fullscreen mode

Open your command prompt (terminal window):

  1. Check that NodeJS is running: node -v
  2. Check that NPM is running: npm -v
  3. Install Yarn package manager : npm install --global yarn
  4. Check Yarn is running: yarn --version
  5. Crate a new database for Strapi 'strapi_db': echo "create database strapi_db;" | mysql -uroot -p , or you can use PHPMyAdmin or HeidiSQL
  6. Install strapi: yarn create strapi-app project-name
    • Select language preference, Javascript or Typescript
    • Select database server preference, MySQL or PostgreSQL
    • Press Enter key for default answer
    • Put same database name as you created before strapi_db
    • Select "N" for SSL
    • If installation is successful, tables are generated automatically for your database
  7. Get into your project folder: cd project-name
  8. Run strapi: yarn develop
  9. Open Strapi Admin in your browser: http://localhost:1337/admin

As always, you are welcome to share your thoughts.

Top comments (0)