add codespaces template that points to todo tutorial app (#1977)

* Create .devcontainer.json

* move dev container

* update devcontainer post command

* move devcontainer

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* add readme and env setup

* fix script

* Update devcontainer.json

* Update devcontainer.json

* Update setup-env.sh

* add dockerfile

* Update devcontainer.json

* env vars

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* Update devcontainer.json

* asdf

* Update devcontainer.json

* replace gitpod mention with codespaces

* Update devcontainer.json

* Update devcontainer.json
This commit is contained in:
vincanger 2024-04-22 16:50:45 +02:00 committed by GitHub
parent a6f06a7a25
commit 4f864ab595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 74 additions and 2 deletions

View File

@ -0,0 +1,27 @@
// These are GitHub Codespaces specific settings.
{
"name": "Wasp Todo App Tutorial",
"customizations": {
"vscode": {
"extensions": ["wasp-lang.wasp", "PKief.material-icon-theme"],
"settings": {
"workbench.iconTheme": "material-icon-theme"
}
}
},
"containerEnv": {
"WASP_TELEMETRY_CONTEXT": "codespaces"
},
"forwardPorts": [3000, 3001],
"portsAttributes": {
"3000": {
"label": "React-Vite Client"
},
"3001": {
"label": "NodeJS Server"
}
},
"onCreateCommand": "curl -sSL https://get.wasp-lang.dev/installer.sh | sh -s",
"postCreateCommand": "printf 'export WASP_WEB_CLIENT_URL=https://$CODESPACE_NAME-3000.app.github.dev\n' >> $HOME/.bashrc && printf 'export REACT_APP_API_URL=https://$CODESPACE_NAME-3001.app.github.dev\n' >> $HOME/.bashrc && echo 'gh codespace ports visibility 3000:public -c $CODESPACE_NAME\n' >> $HOME/.bashrc && echo 'gh codespace ports visibility 3001:public -c $CODESPACE_NAME\n' >> $HOME/.bashrc",
"workspaceFolder": "/workspaces/wasp/examples/tutorials/TodoApp"
}

View File

@ -0,0 +1,45 @@
# Todo App Tutorial Example App
This is an example app that complements the [Intro Wasp Tutorial](https://wasp-lang.dev/docs/tutorial/create). It is a simple Todo App that demonstrates how to use Wasp to build a truly full-stack web app quickly and easily.
This example app represents the final state of the tutorial. If you'd prefer to follow it step-by-step, you can find [the tutorial here](https://wasp-lang.dev/docs/tutorial/create).
This project also allows you to run the app in GitHub Codespaces, so you can try out Wasp without installing anything on your machine.
## Running the App in GitHub Codespaces
On the [main Wasp repo page](https://github.com/wasp-lang/wasp), click on the green "Code" button and create a new Codespace.
Give the Codespace some time to install Wasp and finish initializing, then in the terminal run:
```bash
wasp db migrate-dev
```
Once the migration is done, you can start the app by running:
```bash
wasp start
```
This will start the app. The codespace should prompt you with an "Open in Browser" button. If not, click on the "Ports" tab next to the terminal in the bottom of the Codespace and click on the "forwarded address" for port 3000.
## Running the App Locally
After you've cloned this repository, you can run the app locally by following these steps:
Install Wasp
```bash
curl -sSL https://get.wasp-lang.dev/installer.sh | sh
```
Position yourself in the project directory, then migrate the DB:
```bash
wasp db migrate-dev
```
Finally, run the app:
```bash
wasp start
```

View File

@ -43,7 +43,7 @@ That's it 🎉 You have successfully created and served a new full-stack web app
:::
:::tip Try Wasp Without Installing 🤔?
Give Wasp a spin in the browser without any setup by running our [Wasp Template for Gitpod](https://github.com/wasp-lang/gitpod-template)
Give Wasp a spin in the browser with GitHub Codespaces by following the intructions in our [Tutorial App README](https://github.com/wasp-lang/wasp/tree/main/examples/tutorials/TodoApp)
:::

View File

@ -43,7 +43,7 @@ That's it 🎉 You have successfully created and served a new full-stack web app
:::
:::tip Try Wasp Without Installing 🤔?
Give Wasp a spin in the browser without any setup by running our [Wasp Template for Gitpod](https://github.com/wasp-lang/gitpod-template)
Give Wasp a spin in the browser with GitHub Codespaces by following the intructions in our [Tutorial App README](https://github.com/wasp-lang/wasp/tree/main/examples/tutorials/TodoApp)
:::