DEV Community

Om Prakash Tiwari
Om Prakash Tiwari

Posted on

1 1

PHP Developer with Twig knowledge can start expressjs project with twig in few moment

The Background

As a PHP Developer I was used to work with twig template engine like most of the PHP Developers. I found the twig engine is supported by express js as well and also my teammates were using this extensively. I have decied to use the same template engine for my projects.

Starting the first project

If you are from PHP Background and using twig template engine, and want to switch to express js, then you can follow the below steps to download the boilerplate code for express and setup your project automatically.

  1. Install nodejs (Latest version) from https://nodejs.org/en/download/ (the official website)

  2. Open Command prompt (Windows) or Terminal (Mac/Linux) and run the following command:

    npx start-express [project-name]

    -- [project-name] is the name of your project.
    
  3. This will generate a directory with your project name and add essentials into it.

  4. Open the directory in your text editor.

  5. Run the following command to start the server in development mode:

    npm run devstart

  6. You can now access your project in your browser on port 3000.

A readme file is also generated for more information. You can go through it for more details.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay