Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b271e6

Browse files
committed
Update readme. Update login feature.
1 parent 98d7b4b commit 7b271e6

File tree

3 files changed

+75
-38
lines changed

3 files changed

+75
-38
lines changed

.DS_Store

-2 KB
Binary file not shown.

README.md

+72-37
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,104 @@
1-
# code-server · [!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/cdr/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://cdr.co/join-community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq)
1+
# Coderpair vscode-live
22

33
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.
44

5-
![Screenshot](./doc/assets/screenshot.png)
5+
Set up multiple user accounts. Each user may have their own preferences/settings.
66

7-
## Highlights
7+
Collaborate with your team in real time.
88

9-
- Code on any device with a consistent development environment
10-
- Use cloud servers to speed up tests, compilations, downloads, and more
11-
- Preserve battery life when you're on the go; all intensive tasks run on your server
9+
![Screenshot](./doc/assets/screenshot.png)
1210

1311
## Getting Started
1412

15-
There are two ways to get started:
13+
This is an extension of [code-server's](https://github.com/cdr/code-server) release of vscode.
14+
15+
Almost all the info that you need can be found on the [code-server](https://github.com/cdr/code-server) page. The only thing that will be covered here are the differences.
16+
17+
## Installing
18+
19+
Get the latest release here. Go to the code-server [installation](https://github.com/cdr/code-server/blob/v3.7.3/doc/install.md) page. Refer to the instructions for manual installation for your particular environment.
20+
21+
## Setup
1622

17-
1. Using the [install script](./install.sh), which automates most of the process. The script uses the system package manager (if possible)
18-
2. Manually installing code-server; see [Installation](./doc/install.md) for instructions applicable to most use cases
23+
Run code-server according to the instructions in the installation page above and visit the code-server page in your browser. If everything looks OK, you are ready to start setting up vscode-live.
1924

20-
If you choose to use the install script, you can preview what occurs during the install process:
25+
When `code-server` starts up, it creates a default config file in `~/.config/code-server/config.yaml` that looks
26+
like this:
2127

22-
```bash
23-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
28+
```yaml
29+
bind-addr: 127.0.0.1:8080
30+
auth: password
31+
password: mewkmdasosafuio3422 # This is randomly generated for each config.yaml
32+
admin: osdifnasdfiopsdfn3556 # This is randomly generated for each config.yaml
33+
cert: false
2434
```
2535
26-
To install, run:
36+
The `password` field is what you use to log in to code-server as the default user.
2737

28-
```bash
29-
curl -fsSL https://code-server.dev/install.sh | sh
38+
`admin` is a secondary password that you use for making changed through the dashboard.
39+
40+
## Setting up Firebase
41+
You will need a Firebase account to use the real time collaboration feature. You can [sign up here for a free account](https://console.firebase.google.com/).
42+
43+
After signing up, edit the `config.yaml` so that it looks like this:
44+
45+
```yaml
46+
bind-addr: 127.0.0.1:8080
47+
auth: password
48+
password: mewkmdasosafuio3422 # This is randomly generated for each config.yaml
49+
admin: osdifnasdfiopsdfn3556 # This is randomly generated for each config.yaml
50+
cert: false
51+
firebase-apiKey: '<API_KEY>'
52+
firebase-authDomain: '<DATABASE_NAME>.firebaseapp.com'
53+
firebase-databaseURL: 'https://<DATABASE_NAME>.firebaseio.com'
54+
firebase-ref: '-MCyz2LOkxQUSJBASlcG'
3055
```
3156

32-
When done, the install script prints out instructions for running and starting code-server.
57+
Fill in the `<API_KEY>` and `<DATABASE_NAME>` with your Firebase settings. You can leave the `firebase-ref` field as is or change it if you feel like it! Restart code-server for the changes to go into effect.
3358

34-
We also have an in-depth [setup and configuration](./doc/guide.md) guide.
59+
Skip to [Turn on real time collaboration](#turn-on-real-time-collaboration) if you don't want to set up multiple accounts.
3560

36-
### Alpha Program 🐣
61+
## Setting up multiple accounts
3762

38-
We're working on a cloud platform that makes deploying and managing code-server easier. Consider [updating to 3.6.2](https://github.com/cdr/code-server/releases/tag/v3.6.2) and running code-server with our experimental flag `--link` if you don't want to worry about
63+
You can set up an account for each of your team members. Each user will be able to use vscode-live with their own default settings.
3964

40-
- TLS
41-
- Authentication
42-
- Port Forwarding
65+
In order to set up multiple accounts, add a `users` field to the `config.yaml` file so that it looks like this:
4366

44-
```bash
45-
$ code-server --link
46-
Proxying code-server to Coder Cloud, you can access your IDE at https://valmar-jon.cdr.co
67+
```yaml
68+
bind-addr: 127.0.0.1:8080
69+
auth: password
70+
password: mewkmdasosafuio3422 # This is randomly generated for each config.yaml
71+
admin: osdifnasdfiopsdfn3556 # This is randomly generated for each config.yaml
72+
cert: false
73+
firebase-apiKey: '<API_KEY>'
74+
firebase-authDomain: '<DATABASE_NAME>.firebaseapp.com'
75+
firebase-databaseURL: 'https://<DATABASE_NAME>.firebaseio.com'
76+
firebase-ref: '-MCyz2LOkxQUSJBASlcG'
77+
users: {
78+
robert: {password: pswd1, role: admin},
79+
sara: {password: pswd2, role: user}
80+
leonardo: {password: pswd3, role: user}
81+
}
4782
```
4883

49-
## FAQ
84+
Restart code-server for the changes to go into effect.
85+
86+
You can add as many accounts as you like. You will log in to code server with password you specify, so make sure it is a secure password.
87+
88+
Go to the login page in your browser
5089

51-
See [./doc/FAQ.md](./doc/FAQ.md).
90+
ie http://localhost:8080/login
5291

53-
## Want to help?
92+
and sign in with one of the user accounts.
5493

55-
See [CONTRIBUTING](./doc/CONTRIBUTING.md) for details.
94+
## Turning on real time collaboration
5695

57-
## Hiring
96+
Head over to the dashboard:
5897

59-
We ([@cdr](https://github.com/cdr)) are looking for engineers to help [maintain
60-
code-server](https://jobs.lever.co/coder/e40becde-2cbd-4885-9029-e5c7b0a734b8), innovate on open source, and streamline dev workflows.
98+
ie http://localhost:8080/dashboard
6199

62-
Our main office is in Austin, Texas. Remote is ok as long as
63-
you're in North America or Europe.
100+
go to the real time collaboration section, and turn it on there. Make sure you use the `admin` password in the config file to make changes.
64101

65-
Please get in [touch](mailto:[email protected]) with your resume/GitHub if interested.
102+
Have fun!
66103

67-
## For Organizations
68104

69-
Visit [our website](https://coder.com) for more information about remote development for your organization or enterprise.

src/node/app/login.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ export class LoginHttpProvider extends HttpProvider {
3838
return this.tryLogin(route, request)
3939
default:
4040
this.ensureMethod(request)
41+
/*
4142
if (this.authenticated(request)) {
4243
return {
4344
redirect: (Array.isArray(route.query.to) ? route.query.to[0] : route.query.to) || "/",
4445
query: { to: undefined },
4546
}
4647
}
48+
*/
4749
return this.getRoot(route)
4850
}
4951
}
@@ -71,7 +73,7 @@ export class LoginHttpProvider extends HttpProvider {
7173
// Already authenticated via cookies?
7274

7375
const userData = this.authenticated(request)
74-
if (userData) {
76+
if (userData && request.method != "POST") {
7577
return { code: HttpCode.Ok }
7678
}
7779

0 commit comments

Comments
 (0)