I have a Flutter Mobile App and I need to create a Restful API for my mobile app. I install WebStorm, I learn that I have to get Aqueduct framework etc. I watch some video and try to google it some info to setup a environment in my macOS High Sierra. Because of I get all the information different places I am keep getting PATH issues. There is a lot of information about setting the environment on macOs High Sierra. So I need step by step guidance to set up my environment.
I have install IntelliJ and I have dart and fluter sdk plugin. Later I download and set to my Flutter SDK path to /Users/niyazitoros/flutter/ for my IntelliJ. Until today never had any problem. Now I need to do similar to my Dart SDK. I used brew to install dart as;
Last login: Fri Jun 22 13:38:50 on ttys000
Niyazis-MBP:~ niyazitoros$ brew info dart
dart-lang/dart/dart: stable 1.24.3, devel 2.0.0-dev.64.1
The Dart SDK
https://www.dartlang.org/
/usr/local/Cellar/dart/1.24.3 (2,807 files, 200.7MB) *
Built from source on 2018-04-10 at 10:44:39
/usr/local/Cellar/dart/2.0.0-dev.64.1 (1,222 files, 372.9MB)
Built from source on 2018-06-21 at 16:23:19
From: https://github.com/dart-lang/homebrew-dart/blob/master/dart.rb
==> Options
--with-content-shell
Download and install content_shell -- headless Dartium for testing
--with-dartium
Download and install Dartium -- Chromium with Dart
--devel
Install development version 2.0.0-dev.64.1
==> Caveats
Please note the path to the Dart SDK:
/usr/local/opt/dart/libexec
Niyazis-MBP:~ niyazitoros$
My .bash_profil:
#Setting PATH for flutter
PATH="/Users/niyazitoros/flutter/bin:${PATH}"
export PATH
#Setting Dart2 Path
PATH="/user/local/opt/dart@2/bin:${PATH}"
export PATH
#Setting Aqueduct
PATH="$PATH":"~/.pub-cache/bin"
export PATH
I want to clean everything and create a similar to flutter environment for dart. So here is list of my questions.
I download and I will try to use WebStorm to build a restful api with aqueduct framework. So before my final question I also like to see the road I am trying to take is the correct one.
From the above questions(1-4) and the my goal of "How to set an environment on macOS high Sierra, creating a Restful API for my Flutter Mobile App?" can anyone help me please?
Dartium was only used in Dart 1 and is discontinued.
In Dart 2 use pub run build_runner build
or ... serve
Install Dart with
brew install dart@2
See also How to upgrade to Dart 2? for how to migrate from Dart 1 to Dart 2