I need to post some node, express, mongoose code online as demo for a StackOverflow discussion. Plunkr does not accept node emulation afaik. Any ideas where to host a demo app with live editor of the code?
You can use http://jsapp.us/ to run sample node code.
I am not familiar with Plunkr sorry but judging from the design goals that are on their front page you can user Heroku to achieve similar results (albeit in a slightly different way).
It's really easy, have a free option, and you push via git repository, so it is a no brainer to upload your code iterations to your instance, just commit and push your changes to whatever repository you use.
Related
I set up a GitLab self-hosted instance and its working fine, my problem right now is that I don't really understand how the frontend works. Mostly because I've been focusing on the backend and because I couldn't find documentation about it either. I wish to understand how I can comment out things I don't want to show for the user or in the overall design, change aspects and text, and overall have control of the frontend.
I'm running on Debian 9, the setup was made with Bitnami using Google VM. As far as I understand I have to manually change the files I want, but I really don't understand the structure of this type of frontend.
What language do I need to know here and where should I find the documentation, how to find the correct directory and files, etc.?
While GitLab doesn't officially support any type of "custom frontend", what you can do is:
Fork GitLab
Use the GitLab Development Kit to implement your changes
Run a Source Install of your fork
The frontend is mostly written in HAML (for the server-side bits) and Vue.js (for the client-side bits).
Note: Even an Omnibus install copies raw ruby and javascript files somewhere, and since they’re physically on the system, they can be manually manipulated and hotpatched, but that’s not really a sustainable way of introducing changes to the codebase.
I am working on a project that has a few different code-bases (mostly Meteor), but they all use some of the same API code (schemas, publications and methods).
It doesn't seem very intuitive to have one repository and use sub-trees/sub-modules in my case. Maybe I'm wrong and somebody could help clear it up.
An example structure of my project:
project-landing-page (meteor app for collecting leads and offering basic account management)
project-app (an angular/ionic/cordova/meteor app that is distributed via the app store)
project-worker (a set of cron-like scripts that are executed in the background to manage the data in the mongo instance)
They all share the same schemas, and the two meteor apps use the same methods and publications. It seems a bit cluttered to have one repo for all of this code. Making a branch for the app would also branch the code for the worker scripts. That just seems messy.
Would it be okay to have another repo called "project-apis", that provides the shared code an could be cloned into the other projects? What are the drawbacks? Other than having to run git pull when the "project-apis" repo is updated, I can't really see any.
Would any git-wizards be able to chime in?
Thanks!
I just found out about sails.js and i think it's really awesome. I want to build apps with sails and angular, but i haven't found any guides on doing this. I found this site which is supposed to have a talk on using sails.js instead on express in the mean stack, but there's not video there.
I would be glad for links to videos or blog posts on how to do this.
Thanks all.
This is getting downvoted because its not a direct question about code.
I have a boilerplate sailsjs app that you can use to model your own off of..
https://github.com/mikedevita/sailsjs-v10-angularjs-requirejs-boilerplate
This is based on v0.10 which is in beta right now, but the same concept applies.
I've created a simple yet powerful angular service, published as a bower component: https://github.com/diegopamio/angular-sails-bind
It basically:
Creates the model inside the $scope for you.
Retrieves the model data from the backend using socket.
Watches for changes made by the user in the UI and updates the backend immediately.
Watches for changes made in the backend and updates the UI immediately.
And it does it with just one line of code in your angular app, like this: $sailsBind("", $scope);
I made it as part of a personal project and then I decided to publish it as it could benefit others. It works with sails 0.10. Let me know if it suits your needs or if you'd like to see something else on it.
I using the upcoming weekend to check two things off of my 2013 project list:
Give Cloud Development A Try
Try ANGULAR.JS
My game plan is to set up the MEAN stack on Nitrous.IO and then use the stack to complete one of the many Angularjs tutorial projects available online.
Questions:
I'd be interested in hearing if anyone has set up the MEAN stack on Nitrous or otherwise or if anyone is aware of any good blog post that go through the process for someone with little to no javascript development experience.
Also, if you have setup a MEAN stack are there any things you would do differently or are there any invaluable resources I should be aware of.
Some Resources I Found Useful:
I've been researching online for the past week and have uncovered some great resources, but it would be great to see what others have found or can suggest. Below are some links to some resources that I have come across that may be helpful to others:
Building Angular Start-up Stack - Toronto Meetup Stream
Egghead.io Offers some great Video tutorials on Angular
Google's Angular site has a wealth of info.
USC Linux User Group Youtube video on MEAN on Amazon AWS
Thanks in advance for any resources, insights or guidance.
Since you are starting on JavaScript I would suggest that you start simple. For example
Build a simple web site with Node.js and Express (no Angular, no Mongo).
Deploy it to the cloud.
Then add Angular and see how the structure changes when you use an MVC framework on the client side (e.g. your backend becomes a plain REST API).
Then, play with Node.js and Mongo probably outside your simple Node/Express/Angular app to get the hand of a NoSQL database and database access from Node.js (the fact that everything is async brings some interesting challenges for beginners)
Then integrate Mongo into your app.
Ok, here's how I successfully set-up the MEAN stack on Nitrous.IO.
First, many thanks to Valeri V. Karpov and his The Code Barbarian blog. In July he had a blog post titled Introduction to the MEAN Stack, Part One: Setting Up Your Tools. I primarily followed his article, only making adjustment dictated by the Nitrous cloud platform.
So here are the steps:
Create A Nitrous Box: Go to the Nitrous site and sign-up for an account. Please note the free account does not provide enough storage to accommodate the full MEAN Stack. You'll need at least a "Start" pricing plan - at $9.99 per month.
Create A Nodejs Box: Once you complete your registration and select a pricing plan, its time to create a Nodejs box. Follow the instructions on the Nitrous site. The box comes preconfigured Nodejs.
Install Mongodb: To install Mongodb on your box, go to the shell prompt and type: parts install mongodb You can confirm the installation was successful by typing parts start mongodb. To stop the mongodb server you type parts stop mongodb.
Confirm your Node & NPM Installations: Type node at the command prompt. You should see a > sign if node is installed correctly. You are now in the node shell. Type control-c to exit the shell. Type NPM at the prompt and you should see some usage information
Install Express: type npm install express -g The -g flag means the package will be installed so you can run it from the terminal. Note, if you are using the free box you will likely encounter errors during the Express installation as a result of you exceeded the allocated storage.
From here on you can follow Valeri's article at Step 4 Creating an ExpressJS application..
Good luck and enjoy.
Use Bitnami https://bitnami.com/stack/mean. I like it a lot, pretty simple and concise. In my case it was for Windows and it was a seamless experience
I've built a static website generator which more or less converts markdown documents to html pages. Documents can have tags, which are useful for discovering related documents - and thus is the requirement for a query engine.
Right now I'm using MongoDB but as the application is coded in Node.js and due to the extreme lack of MongoDB support on Node.js hosts (so far no.de is the only one that I know of which supports mongodb), as well as a static website generator having absolutely no need for data persistence, I'd like to remove MongoDB and just keep the query engine.
Are there any MongoDB/NoSQL like query engines coded natively in Node.js/javascript? Or is there a better solution I haven't thought of yet... :S
Thanks guys.
Edit: If there is no such thing, who would like to build it with me? Post a comment if so :)
I'd check out JSONSelect which uses css selectors for querying js objects
Created my own in Coffee-Script for use on the Server-Side with Node.js and Client-Side with Web-Browsers.
It supports all the same queries as MongoDb. Find it here:
https://github.com/bevry/query-engine
RavenDB has a REST API and jQuery plugin available.
For example see http://andreasohlund.net/2011/02/19/accessing-ravendb-using-jsonp/
Take a look at libgit2 which is a C library for git and also the gitteh module for node.js This will give you a node wrapper around a git library - now you can have a local git repo that saves a versioned copy of your static files and serves it up via node.js. What more could you ask for? Plus push pull from github no problem - it knows the git protocols.
I haven't built this myself but happy to help if you want to do this