Here you will find files to start with your API using Scaleway servers and a simple mobile application with IONIC.
The repository is structured as follow:
.
│ README.md
│
└───api
│ │ ... // all the files for making an api on Scaleway using Terraform and NodeJs
│
└───app-example-angular
│ │ ... // all the files for mobile application using Angular framework
│
└───app-example-react
│ │ ... // all the files for mobile application using React framework
│
└───app-example-vue
│ ... // all the files for mobile application using Vue framework
-
Click on
Generate new API key, you should seeAccess KeyandSecret Keykeep the window open -
Then run in a terminal:
export SCW_ACCESS_KEY="[ACCESS KEY]"
export SCW_SECRET_KEY="[SECRET KEY]"
export SCW_DEFAULT_ORGANIZATION_ID="[YOUR ORGANIZATION ID]"Of course you replace [ACCESS KEY], [SECRET KEY] and [YOUR ORGANIZATION ID] by information previously provided by Scaleway console.
-
Go into api folder
cd api -
Then run:
terraform init && terraform applyAnd type yes when asked.
At the end of the process you should see Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
- That's it! You have now a new api created, you can access to it with the ip of your instance and port 3000 (ex: http://151.115.48.28:3000/)
To change your api behavior you can edit index.js.
For iOS build:
For Android build:
-
Go to the folder of the framework you want (ex:
cd app-example-react) -
Run
npm i -
Finally run
ionic serve, a new window will open with the application
-
Run
ionic build -
Then run
ionic capacitor build ios -
Xcode should open with the app, you can now launch it on a simulator / your own device
-
Run
ionic build -
Then run
ionic capacitor build android -
Android Studio should open with the app, you can now launch it on a simulator / your own device
Since Android 9 unsecured http request are not allowed with default configuration, to do so open AndroidManifest.xml and add this parameter:
<application android:usesCleartextTraffic="true">
</application>