Adonis.js is a MVC Framework for NodeJs that enables you to write webapps with less code. It borrows concepts from other solid frameworks like Laravel and leverages ES6 to make code more expressive and maintainable.
Install some essential tools
sudo apt-get update -y sudo apt-get upgrade -y sudo apt-get install -y curl git software-properties-common
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - sudo apt-get update sudo apt-get install -y nodejs
sudo npm install -g adonis-cli nodemon
Create a Test Application
Create a test application called "adonisTestApp"
adonis new adonisTestApp
Start "adonisTestApp" application
cd adonisTestApp npm start
You should see below on command prompt:
> email@example.com start /home/vagrant/adonisTestApp > node --harmony_proxies server.js
To access your app from a web browser use
http://[vultr-vm-ip-address]:3333. You will be greeted with a welcome page form Adonis.
You can stop the application by going back to the terminal and pushing
Ctrl + C, and use nodemon to start the application instead. Nodemon monitors the app for changes and restarts the server automatically which very useful for development. Run the command below to start app with nodemon instead.
nodemon --watch app --harmony_proxies server.js
Adonis is a framework that lets you flush out ideas very quickly, and has great [documentation], where you can reference to find out more about all the features it offers.
Link - 淘实惠-使用采购网站
This article was created by DieDie
This work is licensed under a Creative Commons Attribution 4.0 International License.
This article source Adonis.js Setup On Ubuntu 14
Last Modified Mar 3, 2019 at 12:56 am