Giter VIP home page Giter VIP logo

bitprj-serverless-2022's Introduction

Application - Serverless Camp ⚡

This repository will guide you through how to apply to the Bit Project Serverless Camp!

ReadMe

❓ Huh?

Here's a general overview of application into our serverless bootcamp.

  1. Complete this information form, so we can contact you if you get accepted :)
  2. Use this repository to complete the required coding portion!

🌟 General Tips

  • Each problem is formatted as an issue in GitHub.
  • Read each issue COMPLETELY
  • Create a new branch to write your code
  • Create a pull request to merge the branch you're working on onto main
  • Only merge the pull request when the bot approves your changes
  • If the bot says something went wrong, you can edit your code and commit again!

😀 How to use this repository

  1. Click the green button in the upper-right corner with the text Use this template
  2. Name your repository something interesting, such as bitprj-is-the-best
  3. Wait for about 20 seconds for the repository to be created
  4. Click into the Issues tab
  5. Click New issue
  6. Choose the 🚀 Start Course issue, and click Get started
  7. Click Submit new issue
  8. Click on the Issues tab again to refresh the page
  9. Click into the first issue, and get started :)

📝 Once the first issue is created...

  1. Read the instructions COMPLETELY
  2. Complete steps listed in the instructions
  3. Commit your code to the branch specified in the instructions
  4. Create a pull request to merge the branch you are working on onto main (FIRST STEP ONLY: draft the pull request, then mark it as ready for review)
  5. If the bot approves your pull request, then merge the pull request
  6. If the bot does not approve your changes, look at what the bot comments, and fix your code accordingly

Approve or not?

‼️ Bot approving pull request

Screen Shot 2021-09-04 at 8 46 09 PM

CounselorBot will comment this on your pull request if you completed the step correctly!

✅ Merge the pull request if the bot approves your changes!






‼️ Bot not approving pull request

Screen Shot 2021-09-04 at 8 58 49 PM

When this happens, don't worry! Try to debug your code and commit the code again to the branch you are working on (not main), when you are ready for the bot to check your code again.

❌ When the bot does NOT approve your pull request, do NOT merge the pull request

📖 Helpful Resources

bitprj-serverless-2022's People

Contributors

beatrixcendana avatar counselorbot[bot] avatar

Watchers

 avatar

bitprj-serverless-2022's Issues

Start Course

Click the big green button that says Submit new issue, and you'll be good to go!

Getting Started with Serverless

GitHub

This week, you will be going through steps to set up tools needed to be successful in this camp. If you are already familiar with some, feel free to skip to the end and complete the task to move on.

✅ Tasks:

  • Optional: complete the get started with GitHub guide.
  • Create a new branch named test.
  • Add a paragraph introducing yourself under the About Me section in the blog.md file in root.
  • Commit the change to test.
  • Draft a pull request to your main branch, naming it Adding self introduction and add a detailed description of your contribution.
  • Whenver you're ready, click ready for review
  • If the bot approves your changes, merge the pull request.

What is GitHub?

GitHub is a industry-standard platform allows developers to save and collaborate on code. You can use GitHub to manage your files, changes in your project, version control (the ability to revert back to previous versions of your code as well as versions developed by other programmers), and more.

Check out "The Github Flow" for more information on issues, pull requests, committing, and branches!

If you want to learn more about what it is and how to use it, try taking this GitHub Learning Lab Course. After finishing it, you will have a strong understanding of all the features GitHub has to offer.

✍️Vocabulary

‼️ Repositories

Repositories (or repos) are essentially folders where you can store files of code. The repo of our camp was duplicated into your account when you clicked "Create Template" so that you can commit changes and complete each lesson.

‼️ Issues

For our camp, each week is placed inside an issue. Only when you complete the week (committing the necessary code and commenting), will the issue close and you can move on to the next issue. Don’t worry – committing changes is easier than it sounds.

💡 On usual repositories in the contributing world issues are tasks or bugs that need to be completed or fixed.

‼️ Fork

If you want to contribute to someone else's code, you would "fork" it. This creates a copy of the code under your account that you can make changes to. Create a fork when you want to make changes to someone else's code and contribute to it.

‼️ Branch

Creating a branch on a repository is like forking a repository. You would do this when you want to make changes to your code without harming a working version.

‼️ Pull Request

Once you make changes on a forked repository or another branch, you might need to bring the changes into the "main" repository. This allows YOUR changes to be visible in the main project! *You are basically asking for permission to "merge" your changes."

This allows you to:

⭐ Collaborate on code

⭐ Make comments

⭐ Review the contributions made

‼️ Command Line Interface

A Command Line Interface (CLI) is your computer's visual application for accessing its operating system. There are different types of CLIs for different operating systems, such as Terminal for MacOs and PowerShell for Windows. If you have Windows, make sure to also install Git Bash for a better tool. In upcoming issues, we will refer to your CLI as your Terminal or Command Line, but remember that they mean the same thing!

Key functions you should be familiar with after this task include:

  • Committing changes
  • Forking a repository
  • Making a new branch
  • Making a pull request
❓ What do all the emojis mean? Glad that you asked!
Emoji Meaning
💡 Helpful tips
‼️ Important info
Question you may have
Features

Say Hello to VSCode

Say "Hello" to VS Code

✅ Tasks:

  • Download Visual Studio Code and install the Azure Tools and Live Server extensions
  • Clone this repo using the terminal on VS Code and create a new branch named hello
  • In a new file called helloworld.js, write and export a JS function hello that returns "Hello World"
  • Commit your changes to the hello branch move on
  • Create a pull request that merges hello to main, but do not merge it -- you will find the next step once you have successfully created the pull request and committed correct code

💡 Tip: When we tell you to name a file called directory/thefile.js, the first part before the / is a directory (otherwise known as a folder).

🚧 Test your Work

If you run node helloworld.js in the terminal, the output should be Hello World

Note: From now on, you will never need to close an issue. The Counselor will do that for you, create new issues, and new comments for further instructions!

❌ My code failed, what do I do?

No worries, check this out to help resolve the issue.

💡 TIP: If you want to re-run a check without comitting something else, check this out.

1: The IDE - Visual Studio Code

An IDE is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools, and a debugger. Although there are hundreds of IDEs to choose from, we are going to use Visual Studio Code due to its popularity and integration with Azure (via extensions and libraries).

💻 How to set up your VS Code Environment

Download VS Code for your operating system and check out this tutorial before getting started.

Inside VS Code, download the following extensions:

  • Azure Tools (includes Azure Account, Azure App Service, Azure Functions)
  • Live Server

All of the Azure extensions allow you to work on your Azure Function App in VS Code instead of working directly through the Microsoft portal. Live Server is a quick and temporary testing server, and you can use it to test HTML pages. To launch, right click on your html file and press "Open with Live Server" or click "Go Live" in the bottom right corner:

Screen Shot 2021-01-10 at 1 53 20 PM Screen Shot 2021-01-10 at 1 53 40 PM

💡 Note: Dark Theme is our personal favorite, but feel free to choose whichever theme you like best. Go to this site to view your options!

2: GitHub with VS Code

Check out this awesome documentation about how to set up Git on your local computer

❓ How do I use GitHub on VS Code?
  1. Once you have complete the steps in the documentation, clone this repo on your computer
  2. Use the following commands to work with branches in the terminal:
  • Check which branch you're in: git branch
  • Create a new branch and change into it: git checkout --b name-of-branch
  • Change branch: git checkout name-of-branch
  1. Afterwards, follow this tutorial by VS Code on connecting to GitHub straight from the app!

‼️ Don't forget to git pull before making any changes to your local repo!!

3: Writing and Exporting a Javascript function

JavaScript enables the ability to export functions in a program so that you can access them in other parts of the program via the import statement. In this case, we want to export your programs in order for CounselorBot to check your code.

❓ What are JavaScript and Node?
Javascript is the language of the internet! It is a powerful tool for creating complex web apps. However, JavaScript can be used for building the client for applications, and sometimes requires a way to access this client, which is also known as the server-side. Node.js is the solution to this problem, and allows you to write and run code not linked to a website locally.

❗ Make sure you have Node.js and npm installed before moving forwards: https://www.npmjs.com/get-npm

  • Check if node is installed: run node -v in your terminal
  • Check if npm is installed: run npm -v in your terminal

If you would like to read more, refer to this article on JavaScript and this article on Node.


❓ How do I export a function?
Let's say your function name is `hello`. To export it, add this line of code at the very bottom of your file outside of your function: `module.exports = hello`.

Example:

function hello() {
    // your code
} 

exports.hello = hello;

When you commit the file, we will try to run the function by importing it and compare it's output to the expected output like so:

let hello = require('../../helloworld.js')
let output = hello.hello()

How does this apply to code in the real world?

Just like you can import code from modules other people have written, you can also import functions you wrote from other files to reuse them. In function oriented programming, you use functions over and over again to save code. If you want to use the function hello() in another file, you would need to import it.


❓ Can I have more detailed steps?
  1. Create a new file
  2. Name the file helloworld.js
  3. Write your code
  4. If you have node installed on your computer, open terminal on VS Code and type 'node helloworld.js'
  5. If you have not installed node on your computer, you will need to do that first: https://nodejs.org/en/download/
  6. Tip: to test your function, call it in your code.
  7. Create a new branch named week1 and commit your helloworld.js file in the root directory.


💡 Try to not use the web editor! Commit from your command line.

4: Commiting to a repository using a command line?

Start out by downloading Git. Then, open your command line.

The Commands

Navigate to the directory in your command line where you want to keep your repository.

Tip: Use cd ./your-directory to change directories, pwd to find out where you are, and ls to list files & directories. More information is here.

Cloning your repository Click on "Code" on your repo's page and find your repo's HTTP link:

Use the git clone command and replace the url to get your repository's files onto your local computer:

git clone https://github.com/example/example.git

Now is the time to make your changes to your code!


Committing and pushing code First, "stage" your changes. You will be specifying what files you want to commit the changes of.

Stage helloworld.js changes only:

git add helloworld.js

Stage ALL your changes to the repository:

git add *

Next, let's commit the code. Usually, your commits will be a group of changes that make sense together. Add a description!

git commit -m "insert your description"

Save your commits to the repository on Github!

git push

For more information, refer to this link


Congrats! Your changes should now be visible on Github

Don't forget to git pull before making any changes to your local repo!! This gets any changes that were made by the bot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.