GithubHelp home page GithubHelp logo

adarshaacharya / codetreats Goto Github PK

View Code? Open in Web Editor NEW
31.0 2.0 6.0 2.47 MB

In-browser IDE for running, collaborating, saving and sharing code snippets.

Home Page: https://codetreats.herokuapp.com/

License: MIT License

HTML 0.73% CSS 3.88% TypeScript 95.15% JavaScript 0.18% Shell 0.06%
codetreats codeeditor ide mongodb typescript nodejs reactjs socket-io hacktoberfest heroku snippets hacktoberfest2021 hacktoberfest-accepted express monaco-editor

codetreats's Introduction

Logo

License: MIT Travis (.com) Heroku

In-browser IDE for running, collaborating, saving and sharing code snippets.

⭐ Features

  • In-browser IDE with VS Code like text editor having features like auto-completion, code-formatting
  • 8+ Programming Languages support
  • 15+ Themes Support 🀯
  • Save snippets publicly with shareable link
  • Search snippets with title
  • Realtime Collaboration (unlimited users) πŸ”₯
  • Realtime Chat πŸ’₯

⚠️ Website isn't mobile friendly and for best experience use Google Chrome.

πŸ“Ί Prerequisites

Before running app locally make sure that you install following things:

  • Nodejs with npm or yarn installed
  • Mongodb as database.
  • Strongly recommended to use Robot 3T as MongoDB GUI for local database setup or simply use MongoDB Atlas and paste token in DATABASE_URI

πŸš€ Local Development

Step 1: Clone the repo

https://github.com/adarshaacharya/CodeTreats.git

Step 2: Install dependencies

Install both client and server dependencies

# Install dependencies for server
$ npm install

# Install dependencies for client
$ npm run client:install

Step 3: Configuration

  1. Create .env file in project root dir

    $ touch .env
  2. Copy everything from .env.example as paste it in .env

  3. Go to Glot signup page and create new account.

  4. Then go to this page and copy & paste token in GLOT_TOKEN = <YOUR_TOKEN_HERE> in .env file.

Step 4: Usage

Now you can run the application by :

# Run the client & server with concurrently (for running full application)
$ npm run dev

# Run the Express server only
$ npm run server

# Run the React client only
$ npm run client

# Server runs on http://localhost:5000 and client on http://localhost:3000

β›΅ Production Deployment

There is a Heroku post build script so that you do not have to compile your React frontend manually, it is done on the server. Simply push to Heroku and it will build and load the client index.html page

🀝 Contributing

Contributions, issues and feature requests are welcome. After cloning & setting up project locally, you can just submit a PR to this repo and it will be deployed once it's accepted.

⚠️ Note - Commit & PR Title :

It’s good to have descriptive commit messages so that other folks can make sense of what your commit is doing. This project uses Husky prevent bad git commit, git push and more 🐢 _woof!

Read conventional commits before making the commit message.

πŸ‘πŸ» Show your support

Give a ⭐️ if you like the project!

πŸ‘€ Author

πŸ“ License

Copyright Β© 2020 Aadarsha Acharya.
This project is MIT licensed.

codetreats's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

codetreats's Issues

javascript input is not printed on console.

Describe the bug
javascript input is not printed on console.

To Reproduce
Steps to reproduce the behavior:

  1. Go to CodeTreats
  2. write this code
const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

rl.question("What is your name ? ", function(name) {
    rl.question("Where do you live ? ", function(country) {
        console.log(`${name}, is a citizen of ${country}`);
        rl.close();
    });
});

rl.on("close", function() {
    console.log("\nBYE BYE !!!");
    process.exit(0);
});
  1. select the javascript as language
  2. See error

Expected behavior
It should take input and print it on console.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: ubuntu 20.04
  • Browser :chrome

Additional context
This code works perfectly in my terminal.

Redirect to Snippets Page after new Snippet Submission.

Now after saving snippet we are basically staying on same page which is creating a hell confusion wether form is being submitted or not!

So, it will be good idea to redirect to the snippets page and show newly added snippet on top.

RELOAD TO SNIPPETS

server is runing but not logging into server is runing

Describe the bug
server is runing but not logging into server is runing

To Reproduce
Steps to reproduce the behavior:

  1. Go to codeTreats
  2. write this code
const http =require("http");

const server =http.createServer((req, res)=> {
    if (req.url === "/") {
        res.write("Hello Wrold");
        res.end();
    }
    if (req.url === "/number") {
        res.write(JSON.stringify([1, 2, 3], null, 1));
        res.end();
    }
});

server.listen(3200);

console.log("listening on port 3200...");
  1. select Javascript as language

Expected behavior
Should give output listening on port 3200...

Desktop (please complete the following information):

  • OS: ubuntu 20.04 LTS
  • Browser Chrome

**Additional Context"
I was trying to create local server.

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.