Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mocks-server-lite - An Alternative #493

Open
burt202 opened this issue Apr 5, 2024 · 6 comments
Open

mocks-server-lite - An Alternative #493

burt202 opened this issue Apr 5, 2024 · 6 comments
Assignees
Labels
not an issue Not really an issue. It should be moved somewhere else

Comments

@burt202
Copy link

burt202 commented Apr 5, 2024

https://www.npmjs.com/package/mocks-server-lite

Firstly to the author, feel free to close/delete if you want. Im only posting this here as this project seems dead and i wanted to make others who are interested aware of another option.

Ive been really enjoying using mocks-server, so thanks, but its frustrating to use in a TypeSsript project due to the lack of supplied types and also i worry this project is no longer maintained so thats a risk for me.

Because of this, I decided to write from the ground up, a lightweight alternative that is heavily inspired by the core elements of mocks-server. It is NOT a drop in replacement and only has minimal features, but its similar enough for anyone with the same frustrations to try out.

Any comments or suggestions, post them over on the repo.

Cheers!

@javierbrea
Copy link
Member

Hi @burt202 !

First of all, I'm glad you like the project! No problem in posting this here, maybe it's not the most appropriate place, given that it is not an issue, but I'll leave it here until I think about where should it be placed instead (maybe in a discussion).

About the project being dead, not yet, but it is true that lately I don't have the time it deserves. I try to answer issues as soon as I can, and I hope I will have time to work on them again. Meanwhile, I have planned to continue publishing versions periodically updating the dependencies at least.

About TypeScript, there is already a TypeScript beta version available that you may use: https://github.com/mocks-server/main/releases/tag/v5.0.0-beta.4 . The code is in the branch https://github.com/mocks-server/main/tree/refactor/typescript-migration. The documentation in the website is still not ready, and it produces some breaking changes that are only defined in the CHANGELOG files for the moment, but, who knows, if it is ok for you or any othe user maybe someone may be interested in finishing the docs, write some missing tests, etc. and prepare it as a stable release. I will be happy to collaborate with anyone interested 😃

Cheers, and good luck with your lite version, I hope it will make you enjoy as well. And remember, feel free also to contribute to this project whenever you want.

@javierbrea javierbrea self-assigned this Apr 8, 2024
@javierbrea javierbrea added support not an issue Not really an issue. It should be moved somewhere else and removed support labels Apr 8, 2024
@manuelscurti
Copy link

hi @javierbrea! first, thanks for such awesome work on this project 🙂 second, I would like to help you out. I think I just need to know in details where you need help to speed up things, otherwise I can try to figure it out myself if you don't have time to write some tasks!

@javierbrea
Copy link
Member

Hi @manuelscurti!, thank you very much, it would be great!

As I mentioned in my previous comment here, I think that currently the more urgent thing to do would be to release the branch with the TypeScript migration, because of next reasons:

  • It improves the readability of the code and the data model, so I think it will be easier to maintain after the release.
  • It implied a great refactor that would be very difficult to maintain if we start adding changes to the main branch.

I know that onboarding to a project by writing documentation, tests, or CI workflows is not the best approach, but, unfortunately, those are mainly the parts that are pending to do. Anyway, please let me some time to reorganize the project backlog in order to split this into small tasks with a clear description, so you or anyone else interested could contribute, ideally in parallel. I will try to do it this weekend. This version is already in the release branch, so PRs could be opened to that branch until all the job is done, and we can release it as a stable version. Then, it would be possible again to start adding new features.

@javierbrea
Copy link
Member

Hi again @manuelscurti , sorry for the delay. I have created a project with the pending tasks for finishing the TypeScript migration, which will unblock adding new features to the project. If you are still interested in contributing you can take a look at https://github.com/orgs/mocks-server/projects/4/views/1 and let me know if you have any doubt. Thanks again! 🙂

@manuelscurti
Copy link

manuelscurti commented Jun 12, 2024

hey there! @javierbrea
I started looking around the codebase but failing to understand how to actually run a local instance of the mocks server starting from its sources. I see you are using pnpm in combination with nx but can't see any "start" script configured in the root package.json, neither in other config files (e.g. nx.json). I usually use yarn + npm but I don't expect much differences.

can you help on that? 🙂

@javierbrea
Copy link
Member

Hi @manuelscurti , in fact, there is no "start" script in any package because I usually only execute tests while developing. Anyway, you could easily add one to the "main" package, for example:

{
"scripts": {
    "start": "./bin/mocks-server"
 }
}

Using Nx, you can execute any script from any package in the monorepo by using pnpm nx [script] [package-name] in the root folder, so, once you have added the script, you could run:

pnpm nx start main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not an issue Not really an issue. It should be moved somewhere else
Projects
None yet
Development

No branches or pull requests

3 participants