matthprost / hackathon-scaleway

Files to start hackathon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hackathon base files

Welcome to this hackathon !

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

API

Requirements

Required software / packages

Environment

  1. Go to https://console.scaleway.com/project/credentials

  2. Click on Generate new API key, you should see Access Key and Secret Key keep the window open

  3. 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.

Install & start

  1. Go into api folder cd api

  2. Then run:

terraform init && terraform apply

And type yes when asked.
At the end of the process you should see Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

  1. 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.

Mobile Application

Requirements

Required software / packages

For iOS build:

For Android build:

Install & start

  1. Go to the folder of the framework you want (ex: cd app-example-react)

  2. Run npm i

  3. Finally run ionic serve, a new window will open with the application

Build on iOS

  1. Run ionic build

  2. Then run ionic capacitor build ios

  3. Xcode should open with the app, you can now launch it on a simulator / your own device

Build on Android

  1. Run ionic build

  2. Then run ionic capacitor build android

  3. Android Studio should open with the app, you can now launch it on a simulator / your own device

Error on Android Studio

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>

About

Files to start hackathon


Languages

Language:TypeScript 36.1%Language:CSS 16.1%Language:Swift 13.0%Language:SCSS 9.5%Language:JavaScript 6.8%Language:Java 5.7%Language:HTML 5.1%Language:Vue 5.0%Language:Ruby 1.9%Language:HCL 0.8%