https://github.com/matthprost/hackathon-scaleway
Files to start hackathon
https://github.com/matthprost/hackathon-scaleway
Last synced: 3 months ago
JSON representation
Files to start hackathon
- Host: GitHub
- URL: https://github.com/matthprost/hackathon-scaleway
- Owner: matthprost
- Created: 2020-11-20T17:58:35.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-22T15:26:33.000Z (over 4 years ago)
- Last Synced: 2025-01-11T14:22:26.447Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 890 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
- [Terraform](https://www.terraform.io/)
- [NodeJs](https://nodejs.org/)
- [Ansible](https://www.ansible.com/)#### 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:
```sh
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:
```sh
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.`3. 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
- [IONIC](https://ionicframework.com/)
- [NodeJs](https://nodejs.org/)For iOS build:
- [Xcode](https://apps.apple.com/fr/app/xcode/id497799835?mt=12)For Android build:
- [Android Studio](https://developer.android.com/studio)### 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:
```xml
```