Coder Social home page Coder Social logo

portfolio-repository's Introduction

Open in GitHub Codespaces

.NET Codespaces Template

Extend and use for your Web Development lessons in minutes.

This .NET Codespaces template provides you a normalized environment for you to build your class on. No setup time needed from you or your students, allowing you to focus on the content and lessons.

  • Who is this for? Educators of all levels.
  • How much experience do students need? Zero. This template is built with basic elements complete with comments so it can be used in beginner to advanced lessons.
  • Can I use this template for other .NET applications? Absolutely. This template uses ASP.NET web app and API app as examples.
  • Prerequisites: None. This template will provide a working and deployable web app and API app you can immediately extend for your needs.
๐ŸŽฅ Watch the video tutorial to learn more about Codespaces

Codespaces Tutorial

๐Ÿš€ Codespaces features:

  • Repeatable cloud environment offering a push-button experience.
  • Can be configured and customized.
  • Integrates with your repositories on GitHub and Visual Studio Code.

As a teacher that means that you can create an environment, in the cloud, for your class that all students can use with zero or next to zero configuration regardless of what operating system they are using.

๐Ÿง‘โ€๐Ÿซ What is GitHub Codespaces and how can I use it in my teaching?

A Codespace is a development environment that's hosted in the cloud that you can configure. The Codespaces Education benefit gives Global Campus teachers a free monthly allowance of GitHub Codespaces hours to use in GitHub Classroom. Learn more here about Using GitHub Codespaces with GitHub Classroom.

If you are not already a Global Campus teacher, apply here or for more information, see Apply to GitHub Global Campus as a teacher.

๐Ÿ” What is in this template?

This template repository contains:

  • .devcontainer settings:
    • Dockerfile: defines the devcontainer image for GitHub Codespaces that determines the operating system and .NET version.
    • devcontainer.json: declares the devcontainer configuration for GitHub Codespaces including extensions and tools to be pre-installed, and workspace settings.
    • post-create.sh: describes additional tools to be pre-installed.
  • ASP.NET web app: A sample web app
  • ASP.NET API app: A sample API app
  • README: this file โ€“ describes this repository and what's in it.

๐Ÿš€ Getting Started

  1. Create a repository from this template. Use this create repo link. You can make the repository private or public, up to you.

  2. Navigate to the main page of the newly created repository.

  3. Under the repository name, use the Code drop-down menu, and in the Codespaces tab, select "Create codespace on main".

    Create codespace

  4. Wait as Github initializes the codespace:

    Creating codespace

๐Ÿ› ๏ธ Customization

Customize your project for GitHub Codespaces by committing configuration files to your repository (often known as Configuration-as-Code), which creates a repeatable Codespaces configuration for all users of your project.

You can configure things like:

  • Extensions, you can specify what extensions should be preinstalled.
  • Dotfiles and settings.
  • Operating system libraries and dependencies

๐Ÿ’ก Learn more about customization and configuration in the official documentation

Customization on devcontainer.json

Base Image

By default, this devcontainer settings uses the base image of .NET 7.0 on Debian 11 by default. You can change the base image to one in the list.

"build": {
  "dockerfile": "./Dockerfile",
  "context": ".",
  "args": {
    "VARIANT": "7.0"
  }
}

Features

  1. Azure CLI: Uncomment the section under the features attribute.

    "features": {
      ...
      "ghcr.io/devcontainers/features/azure-cli:1": {
        "version": "latest"
      }
      ...
    },
  2. GitHub CLI: Uncomment the section under the features attribute.

    "features": {
      ...
      "ghcr.io/devcontainers/features/github-cli:1": {
        "version": "latest"
      }
      ...
    },
  3. node.js: Uncomment the section under the features attribute. The latest LTS version of node.js is chosen by default.

    "features": {
      ...
      "ghcr.io/devcontainers/features/node:1": {
        "version": "lts",
        "nodeGypDependencies": true,
        "nvmInstallPath": "/usr/local/share/nvm"
      }
      ...
    },

๐Ÿ” If you want to add more features, find this repository: devcontainer features.

Extensions

  1. There are optional extensions pre-installed under the customizations.vscode.extensions attribute.

    "customizations": {
      "vscode": {
        "extensions": [
          "ms-dotnettools.csharp",
          "ms-vscode.PowerShell",
          "ms-vscode.vscode-node-azure-pack",
          "VisualStudioExptTeam.vscodeintellicode"
        ],
        ...
      }
    }

๐Ÿ” Alternatively, you can add as many extra extensions as you like, from Visual Studio Code Marketplace.

Customization on post-create.sh

You can pre-install any tool through post-create.sh, which the devcontainer features don't natively support yet. eg) PowerShell.

  1. If you want to install oh-my-posh for PowerShell, uncomment the section below

    ## OH-MY-POSH ##
    # Uncomment the below to install oh-my-posh
    sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
    sudo chmod +x /usr/local/bin/oh-my-posh

๐Ÿ” There are more customization scenarios in post-create.sh, if you like to follow.

๐Ÿ“š Resources

๐Ÿ”Ž Found an issue or have an idea for improvement?

Help us make this template repository better by letting us know and opening an issue!.

portfolio-repository's People

Contributors

arvindgupta786 avatar

Watchers

 avatar

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.